Socket
Socket
Sign inDemoInstall

parser-csv

Package Overview
Dependencies
4
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

parser-csv

CSV parser, compatible with [parser-cache].


Version published
Maintainers
1
Weekly downloads
996
decreased by-2.45%

Weekly downloads

Readme

Source

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

  • 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).

parseSync

  • str {String|Object}: The object or string to parse.
  • returns: {Object}

Parse the given str of CSV and return an object.

parseFile

  • 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).

parseFileSync

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

  • fp {String}
  • options {Object}: Options to pass to parse-csv
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.

Keywords

FAQs

Last updated on 24 Nov 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc