minimal-csv-formatter

1.0.19 • Public • Published

Minimal CSV Formatter

Build Status codecov npm version

Transforms arrays into equivalent CSV strings. Conforms to RFC 4180, with the exception that, instead of CRLF, LF is used as line delimiter.

Usage

const csv = require('minimal-csv-formatter');

let singleRow = csv(['x', 'y']);
// 'x,y\n'

let multipleRows = csv([
  [1, 2],
  [3, 4],
]);
// '1,2\n3,4\n'

let emptyFields = csv([null, undefined]);
// ',\n'

let emptyRows = csv([
  [],
  null,
  undefined,
]);
// ''

Readme

Keywords

Package Sidebar

Install

npm i minimal-csv-formatter

Weekly Downloads

63

Version

1.0.19

License

MIT

Unpacked Size

5.95 kB

Total Files

6

Last publish

Collaborators

  • soroushj