# parse-csv-json

> converts any uploaded csv into json

Latest version **1.2.10** (published 2023-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install parse-csv-json
pnpm add parse-csv-json
yarn add parse-csv-json
bun add parse-csv-json
```

Provides the command `parse-csv-json`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.10 |
| Published | 2023-03-22 |
| First published | 2023-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Benhur Immanuel Benjamin |
| Maintainers | benhurimmanuel |
| Keywords | convert csv to json, csv JSON parser, parse csv json, parse-csvJson, csvJsonParser, csv_JSON-parser, csv-json-convertor, json_convertor, csv-convertor, json-convertor, csv_json_convertor, json-convertor, jsonConvertor |

## Links

- npm: https://www.npmjs.com/package/parse-csv-json
- Homepage: https://github.com/Benhurimmanuel/csvJsonConvertor#readme.md
- npm.io page: https://npm.io/package/parse-csv-json

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.2.10 (latest) — 2023-03-22
- 1.2.2 — 2023-03-22
- 1.2.0 — 2023-03-22

## README

# Description
 
 This Package can be used to convert csv files to JSON objects and vice versa

# LICENSE 
MIT License

Copyright (c) 2023 Benhurimmanuel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

# Install
```
$ npm i parse-csv-json
```
```
 await csv_json_convertor.csvJson(pathtofile,delimtter)
 note: empty strings will be converted to null 
```

```

//example

$ const csv_json_convertor = require("parse-csv-json");

//note : by default the delimmter for the csv are `_-;,`, delimtters can be changed in the fucntion by passing as a continous string


const test =async ()=>{
   console.lpg(await csv_json_convertor.csvJson("./test.csv"))
   //console.lpg(await csv_json_convertor.csvJson("./test.csv",`$`))
}


//input
Series Title,Season,Episode,Series Status
Series 1,S13,14,
Series 2,S6,14,
Series 3,S5,17,
Series 4,S1,16,
Series 5,S20,15,
Series 6,s1,3,
Series 7,S3,6,
Series 8,S6,10,Ended
Series 9,S8,10,Ended
Series 10,S5,10,Ended
Series 11,S01,7,
Series 12,S03,23,
Series 13,S01,2,

//output
$[
  {
    'Series Title': 'Series 1',
    Season: 'S13',
    Episode: '14',
    'Series Status': null
  },
  {
    'Series Title': 'Series 2',
    Season: 'S6',
    Episode: '14',
    'Series Status': null
  },
  {
    'Series Title': 'Series 3',
    Season: 'S5',
    Episode: '17',
    'Series Status': null
  },
  {
    'Series Title': 'Series 4',
    Season: 'S1',
    Episode: '16',
    'Series Status': null
  },
  {
    'Series Title': 'Series 5',
    Season: 'S20',
    Episode: '15',
    'Series Status': null
  },
  {
    'Series Title': 'Series 6',
    Season: 's1',
    Episode: '3',
    'Series Status': null
  },
  {
    'Series Title': 'Series 7',
    Season: 'S3',
    Episode: '6',
    'Series Status': null
  },
  {
    'Series Title': 'Series 8',
    Season: 'S6',
    Episode: '10',
    'Series Status': 'Ended\r'
  },
  {
    'Series Title': 'Series 9',
    Season: 'S8',
    Episode: '10',
    'Series Status': 'Ended\r'
  },
  {
    'Series Title': 'Series 10',
    Season: 'S5',
    Episode: '10',
    'Series Status': 'Ended\r'
  },
  {
    'Series Title': 'Series 11',
    Season: 'S01',
    Episode: '7',
    'Series Status': null
  },
  {
    'Series Title': 'Series 12',
    Season: 'S03',
    Episode: '23',
    'Series Status': null
  },
  {
    'Series Title': 'Series 13',
    Season: 'S01',
    Episode: '2',
    'Series Status': null
  }
]
```

---
_Source: https://npm.io/package/parse-csv-json · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
