Stream Reader for Node.JS is Open Source
I/O APIs are very important. Node.js’ file stream API is very rough for reading file stream.
The fact is that, the API is hard to use, for example:
var fs = require('fs');
The pain point is that, the data is read in an closure, you cannot read a chunk buffer with an expected length (even though you can use
readable), so it makes it difficult to code. I don’t like to have too many callbacks neither. So I created a stream reader to get rid of the callback hell.
npm i --save ginkgoch-stream-reader
const fs = require('fs');
See, we use
async function, no callbacks and we can read any length of buffer as we need to.