generateparsetransformstringify

Comprehensive CSV suite combining 4 well tested packages to generate, parse, transform and stringify CSV data.

csv-generate

NPM version Travis build status

Write random and user-defined strings, objects and arrays

csv-parse

NPM version Travis build status

Read CSV strings and buffers and write object and arrays

stream-transform

NPM version Travis build status

Read and write objects and arrays

csv-stringify

NPM version Travis build status

Read object and arrays and write CSV strings

Quick Example

// Import the package main module
const csv = require('..')
// Use the module
csv
// Generate 20 records
.generate({
  delimiter: '|',
  length: 20
})
// Parse the records
.pipe(csv.parse({
  delimiter: '|'
}))
// Transform each value into uppercase
.pipe(csv.transform(function(record){
   return record.map(function(value){
     return value.toUpperCase()
   });
}))
// Convert the object into a stream
.pipe(csv.stringify({
  quoted: true
}))
// Print the CSV stream to stdout
.pipe(process.stdout)