Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

csvtojson-converter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csvtojson-converter

easy csv to json converter in TypeScript, can be used as a module

  • 2.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24
decreased by-27.27%
Maintainers
1
Weekly downloads
 
Created
Source

CSV to JSON converter

simply and fast converter that can be used as module

Description

CSV look like:

nameagesexaddress
John18MNY, Brooklyn
Alice22FBritan, Newington

Text with will look like: (delimiter: ",")

name,age ,sex,adderss
John,18,M,"NY, Brooklyn"
Alice,22,F,"Britan, Newington"

simply call function csvToJson() with at least one parametr

const csvText = 'name,age,sex,adderss\nJohn,18,M,"NY, Brooklyn"\nAlice,22,F,"Britan, Newington"';
const delimiter = ',';

//wit delimiter
const json = csvToJson(csvText, delimiter);

//you can call it without dilimiter if it is: , ; | " "
const json =  csvToJson(csvText);

It will generate JSON like this:

[
 {
  "name": "John",
  "age": 18,
  "sex": "M",
  "address": "NY, Brooklyn"
 },
 {
  "name": "Alice",
  "age": 22,
  "sex": "F",
  "address": "Britan, Newington"
 }
]

Install npm

npm install csvtojson-converter -D

Keywords

FAQs

Package last updated on 04 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc