api documentation WIP

This commit is contained in:
Jan Prochazka
2024-11-15 16:09:04 +01:00
parent 8cb98cf643
commit f23575c405
6 changed files with 399 additions and 4 deletions

View File

@@ -33,6 +33,14 @@ class ParseStream extends stream.Transform {
}
}
/**
* Reader function, which reads JSNOL file or URL. JSONL format - text file, every line is JSON encoded row.
* @param {Object} options
* @param {string} options.fileName - file name or URL
* @param {string} options.encoding - encoding of the file
* @param {number} options.limitRows - maximum number of rows to read
* @returns {Promise<readerType>} - reader object
*/
async function jsonLinesReader({ fileName, encoding = 'utf-8', limitRows = undefined }) {
logger.info(`Reading file ${fileName}`);