0.1.2 • Published 5 years ago

csv-linereader v0.1.2

Weekly downloads
3
License
MPL-2.0
Repository
github
Last release
5 years ago

Installation

npm i --save csv-linereader
yarn add csv-linereader

Usage

const reader = require('csv-linereader');

const handler = async data => {
  console.log(data);
  await new Promise(
    resolve =>
      void setTimeout(function() {
        console.log('Unlock handler');
        resolve();
      }, 1e2),
  );
};

async function main() {
  await reader('myfile.csv', handler, { skipHeader: true });
  console.log('Done.');
}

API

function reader(
  fileName: string,
  handler: (data: Array<string>) => Promise<void>,
  {
    delimiter = ',',
    skipHeader = false,
    operationLimit = 1e4,
  }: {|
    delimiter: string,
    skipHeader: boolean,
    operationLimit: number,
  |},
): Promise<void> {}
0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago