1.0.2 • Published 1 year ago

blazecsv v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

node-csv

A lightweight csv reader for nodejs.

Usage

The utilities are exposed via the "CSV" class. Please refer to the directions below for help getting started.

  1. Install the library either by cloning this repo or with npm
 npm install csvjs
  1. Create a new file script.js with the following contents
// import library
const {CSV} = require("csvjs")

// reading a file
let csv = new CSV("<path-to-csv-file>")

//get rows
let rows = csv.read()

//get object list
let objects = csv.read(true)

//append an object to the csv file
csv.append({...yourObject})

//write object list to file
csv.write(objectList:{}[])

//write object list to a different file
csv.write(objectList:{}[],"<new-file-name>")
1.0.2

1 year ago

1.0.1

1 year ago