# jsonconverter

> A nodejs module that will convert csv file to json file

Latest version **1.0.4** (published 2018-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install jsonconverter
pnpm add jsonconverter
yarn add jsonconverter
bun add jsonconverter
```

## 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.0.4 |
| Published | 2018-11-01 |
| First published | 2017-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | astha jadia |
| Maintainers | asthajadia12 |
| Keywords | nodejs, json, csv, jsontocsv |

## Links

- npm: https://www.npmjs.com/package/jsonconverter
- Repository: https://github.com/asthajadia12/jsonconverter
- Homepage: https://github.com/asthajadia12/jsonconverter#readme
- Issues: https://github.com/asthajadia12/jsonconverter/issues
- npm.io page: https://npm.io/package/jsonconverter

## Dependencies (1)

- [co](https://npm.io/package/co.md) ^4.6.0

## 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.0.4 (latest) — 2018-11-01
- 1.0.3 — 2017-06-27
- 1.0.2 — 2017-06-27
- 1.0.1 — 2017-06-27
- 1.0.0 — 2017-06-27

## README

# jsonconverter
# A Nodejs module that converts csv to json.

Installation:
```bash
$ npm i jsonconverter
```

## API

.csvToJson(csvData, option, callback( err, data ){ })
   option parameter:
  - fromFile: set true if you are passing data through file.
  - toFile: : set true if you want output in the form of file. 

## Examples

Conversion of raw csv to raw json as output. 
```js
var jsonc = require('@asthajadia12/jsonconverter');

jsonc.csvToJson(csvData, {},
  function (err, data) {
      return data; // returns raw data
})
```

Conversion of csv file data to raw json as output.
```js
jsonc.csvToJson(csvFilePath, { fromFile: true },
  function (err, data) {
      return data; // returns raw data
})
```

Conversion of csv file data to json file as output.
```js
jsonc.csvToJson(csvFilePath, { fromFile: true, toFile: true },
  function (err, data) {
      return data; // returns output as output.json in currenct directory
})
```

License
----

MIT

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