lyxaira.glass 74ca844f42 Actualizacion cambios generados: seccion #12, #14 y #15. | 4 anni fa | |
---|---|---|
.. | ||
index.d.ts | 4 anni fa | |
index.js | 4 anni fa | |
license | 4 anni fa | |
package.json | 4 anni fa | |
readme.md | 4 anni fa |
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