csv-parser-generator

1.0.13 • Public • Published

CSV Parser Generator

An extremely simple and fast CSV parser generator. This is meant to be a building block for CSV parsers and other things that need to parse CSV.

This module generates a parser based on the arguments passed, which then will parse a single line, returning all fields it can find.

Installing

$ npm install csv-parser-generator

Usage

var generator = require('csv-parser-generator');
 
var parser = generator({ delimiter: " " });
parser.parse('"foo bar" bar baz');

Options

  • delimiter - which delimiter to split on
  • strip-whitespace - if this is set to true, will automatically strip any whitespace on either side of the column
  • ignore-quotes - if this is set to true, parsing will completely ignore all quotation marks and not treat them as special containers of fields, e.g. "hello, world" would parse out as "hello",_" world".

Package Sidebar

Install

npm i csv-parser-generator

Weekly Downloads

43

Version

1.0.13

License

ISC

Last publish

Collaborators

  • jerrysievert