The node-listreader is a node module to read all lines via a buffer from a file into an array:
readList "data/list.txt"consolelog el for el in arr
The module can be required via node's require, or as an AMD module via requirejs.
You can either set the path at construction via
new ListReader(path) or when reading the file via
You can either wait for a callback as in the example above or receive a promise (powered by when):
promise = readList "data/list.txt"promisedoneconsolelog el for el in arr
There is a codo created documentation in the doc folder with more details.