@fluidapps/csvify

0.2.1 • Public • Published

csvify

Thin wrapper around node-csv-stringify providing a simple callback interface, sensible defaults and a few extras.

Installation

npm install @fluidapps/csvify

Basic usage

var csvify = require('@fluidapps/csvify');

csvify(objectArray, function(err, data) {
  // data is a CSV representation of objectArray
});

Options

  • excelFriendly: prepend the resulting data with sep= to hint Excel into automatically importing the CSV

  • stringifier: options object passed directly to node-csv-stringify options

Defaults

csvify(objectArray, {
  excelFriendly: false,
  stringifier: {
    header: true
  }
}, callback);

Readme

Keywords

Package Sidebar

Install

npm i @fluidapps/csvify

Weekly Downloads

1

Version

0.2.1

License

MIT

Last publish

Collaborators

  • fluidapps