alejandro.alvarez5 70bb213259 articulo | vor 3 Jahren | |
---|---|---|
.. | ||
index.d.ts | vor 3 Jahren | |
index.js | vor 3 Jahren | |
license | vor 3 Jahren | |
package.json | vor 3 Jahren | |
readme.md | vor 3 Jahren |
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