Christian Matos 35195f1065 IOS | пре 4 година | |
---|---|---|
.. | ||
index.d.ts | пре 4 година | |
index.js | пре 4 година | |
license | пре 4 година | |
package.json | пре 4 година | |
readme.md | пре 4 година |
Read a chunk from a file
Because the built-in way requires way too much boilerplate.
$ npm install read-chunk
const readChunk = require('read-chunk');
// foo.txt => hello
readChunk.sync('foo.txt', 1, 3);
//=> 'ell'
Returns a Promise<Buffer>
with the read chunk.
Returns a Buffer
with the read chunk.
Type: string
Type: number
Position to start reading.
Type: number
Number of bytes to read.
MIT © Sindre Sorhus