Home

Awesome

parser-csv NPM version

CSV parser, compatible with parser-cache.

Install

Install with npm

npm i parser-csv --save

Run tests

npm test

Usage

var parser = require('parser-csv');

See parse-csv for the full range of options and features, and to report issues related to parsing.

parse

parser.parse(str, options, function(err, res) {
  if (err) { throw err; }
  console.log(res);
});

parseFile

parser.parseFile('fixtures/a.csv', function (err, res) {
  if (err) { throw err; }
  console.log(res);
});

parseSync

var res = parser.parseSync(str, options);
console.log(res);

API

parse

Parse the given str of CSV and callback cb(err, json).

parseSync

Parse the given str of CSV and return an object.

parseFile

CSV file support. Parse the given str of CSV and callback cb(err, data).

parseFileSync

CSV file support. Parse a file at the given fp.

parser.parseFile('foo/bar/baz.csv');

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert
Released under the MIT license


This file was generated by verb on November 24, 2014.