node package manager

@fluidapps/csvify

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);