@javarome/csv4json
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

csv4json

Converts CSV to JSON, and vice versa.

Vanilla JS, no dependencies.

Setup

Either install it globally:

npm install -g @javarome/csv4json

or locally:

npm install @javarome/csv4json

Usage

CLI

csv4json --input <csv or json file> --output <json or csv file>

API

Convert file

const converter = new Csv4Json('../test/input.csv', '../test/output.json', ',', '\n')
converter.run().then(result => {
  console.log('Written', result)
})

Convert contents

const converter = new Csv4Json('../test/input.csv', '../test/output.json', ',', '\n')
converter.run().then(result => {
  console.log('Written', result)
})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

Package Sidebar

Install

npm i @javarome/csv4json

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

12.7 kB

Total Files

23

Last publish

Collaborators

  • javarome