Files: d2f2697f296dd39aed6a8b63c6d04a736a7db5b3 / 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