Files: 1f9a3fcaa6f6fa4a3ad0a219f6df1a476588f6d5 / node_modules / pull-file / examples / ipsum-chunks.js
295 bytesRaw
1 | var file = require('..'); |
2 | var pull = require('pull-stream'); |
3 | var path = require('path'); |
4 | var inputFile = path.resolve(__dirname, '../test/assets/ipsum.txt'); |
5 | |
6 | pull( |
7 | file(inputFile, { bufferSize: 40 }), |
8 | pull.take(4), |
9 | pull.drain(function(buffer) { |
10 | console.log(buffer.toString()); |
11 | }) |
12 | ); |
Built with git-ssb-web