CSV parser, compatible with [parser-cache].
npm install parser-csv> CSV parser, compatible with [parser-cache].
``bash`
npm i parser-csv --save
`bash`
npm test
js
var parser = require('parser-csv');
`See [parse-csv] for the full range of options and features, and to report issues related to parsing.
$3
`js
parser.parse(str, options, function(err, res) {
if (err) { throw err; }
console.log(res);
});
`$3
`js
parser.parseFile('fixtures/a.csv', function (err, res) {
if (err) { throw err; }
console.log(res);
});
`$3
`js
var res = parser.parseSync(str, options);
console.log(res);
`API
$3
*
str {String|Object}: The object or string to parse.
* options {Object|Function}: or cb callback function.
* cb {Function}: callback function. Parse the given
str of CSV and callback cb(err, json).$3
*
str {String|Object}: The object or string to parse.
* returns: {Object} Parse the given
str of CSV and return an object.$3
*
str {String|Object}: The object or string to parse.
* returns: {Object} CSV file support. Parse the given
str of CSV and callback cb(err, data).$3
CSV file support. Parse a file at the given
fp.*
fp {String}
* options {Object}: Options to pass to [parse-csv] `js
parser.parseFile('foo/bar/baz.csv');
``Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
+ github/jonschlinkert
+ twitter/jonschlinkert
*
_This file was generated by verb on November 24, 2014._
[parser-cache]: https://github.com/jonschlinkert/parser-cache
[parse-csv]: https://github.com/jonschlinkert/parse-csv