Classes
Methods
# createReadStream(options) → {PromiseLikeReadStream}
Open stream for read from file. Return stream, which can be awaitable while stream closed.
Parameters:
Name | Type | Description |
---|---|---|
options |
standard Node fs.createReadStream options |
- work as standart node ReadStream, but can act as
Pomise wich resolves on stream 'close' event
PromiseLikeReadStream
# csvArrays(splitter) → {FSIterable.<Array.<string>>}
Read csv as array of arrays
Parameters:
Name | Type | Description |
---|---|---|
splitter |
FSIterable.<Array.<string>>
# csvArraysAsync(splitter) → {FSAsyncIterable.<Array.<string>>}
Read csv file as splitted strings array line-by-line with async iterator.
Parameters:
Name | Type | Description |
---|---|---|
splitter |
text symbol which used as delimeter |
FSAsyncIterable.<Array.<string>>
# csvWithHeader(splitter) → {FSIterable.<Record.<string, string>>}
Read csv as objects. Take first line as object keys
Parameters:
Name | Type | Description |
---|---|---|
splitter |
FSIterable.<Record.<string, string>>
# csvWithHeaderAsync(splitter) → {FSAsyncIterable.<Record.<string, string>>}
Read csv files and converts it to objects with keys from first line of file
Parameters:
Name | Type | Description |
---|---|---|
splitter |
text symbol which used as delimeter |
FSAsyncIterable.<Record.<string, string>>
# lineByLineAsync()
Read text file line-by-line with async iterator
# async txt() → {Promise.<string>}
Returns all file content as string. On error throws
NodeJS.ErrnoException
Promise.<string>