JSPM

  • Created
  • Published
  • Downloads 2947857
  • Score
    100M100P100Q206317F
  • License MIT

CSV parser and writer

Package Exports

  • fast-csv

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fast-csv) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm version Build Status Coverage Status Known Vulnerabilities

Fast-csv

Fast-csv is library for parsing and formatting csvs or any other delimited value file in node.

Installation

npm install -S fast-csv

Usage

To use fast-csv in javascript you can require the module/

const csv = require('fast-csv');

To import with typescript

import * as csv from 'fast-csv';

Documentation

Quick Examples

parsing

To read a csv with headers create a read stream and pipe it to parser.

fs.createReadStream('path/to/my.csv')
  .pipe(csv.parse({ headers: true }))
  .on('data', row => console.log(row))

For more in depth parsing examples and docs check out the parsing docs

formatting

To format a csv you can write rows to a formatter.

someStream
  .pipe(csv.format({ headers: true })
  .pipe(process.stdout);

For more in depth formatting examples and docs check out the formatting docs

Migrating from older versions

License

MIT https://github.com/C2FO/fast-csv/raw/master/LICENSE

Meta