Socket
Socket
Sign inDemoInstall

json-2-csv

Package Overview
Dependencies
Maintainers
1
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-2-csv - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

src/constants.json

13

package.json

@@ -5,3 +5,3 @@ {

"description": "A JSON to CSV and CSV to JSON converter that natively supports sub-documents and auto-generates the CSV heading.",
"version": "2.3.1",
"version": "2.4.0",
"repository": {

@@ -11,3 +11,3 @@ "type": "git",

},
"main": "./lib/converter.js",
"main": "./src/converter.js",
"scripts": {

@@ -29,5 +29,6 @@ "test": "./node_modules/.bin/mocha test/tests.js",

"dependencies": {
"underscore": "1.9.1",
"doc-path": "1.2.2",
"bluebird": "3.5.2"
"bluebird": "3.5.3",
"deeks": "1.0.0",
"doc-path": "1.3.1",
"underscore": "1.9.1"
},

@@ -41,5 +42,5 @@ "devDependencies": {

"engines": {
"node": ">= 4"
"node": ">= 6"
},
"license": "MIT"
}

@@ -1,5 +0,6 @@

# Convert JSON to CSV or CSV to JSON
# json-2-csv
**Convert JSON to CSV _or_ CSV to JSON**
[![Dependencies](https://img.shields.io/david/mrodrig/json-2-csv.svg?style=flat-square)](https://www.npmjs.org/package/json-2-csv)
[![Build Status](https://travis-ci.org/mrodrig/json-2-csv.svg?branch=master)](https://travis-ci.org/mrodrig/json-2-csv)
[![Dependencies](https://img.shields.io/david/mrodrig/json-2-csv.svg?style=flat-square)](https://www.npmjs.org/package/json-2-csv)
[![Downloads](http://img.shields.io/npm/dm/json-2-csv.svg)](https://www.npmjs.org/package/json-2-csv)

@@ -24,3 +25,3 @@ [![NPM version](https://img.shields.io/npm/v/json-2-csv.svg)](https://www.npmjs.org/package/json-2-csv)

```javascript
var converter = require('json-2-csv');
let converter = require('json-2-csv');
```

@@ -30,3 +31,3 @@

#### json2csv(array, callback, options)
#### `converter.json2csv(array, callback, options)`

@@ -63,10 +64,12 @@ * `array` - An array of JSON documents to be converted to CSV.

* If you want all keys to be converted, then specify ```null``` or don't specify the option to utilize the default.
For examples, please refer to the [json2csv API Documentation (Link)](https://github.com/mrodrig/json-2-csv/wiki/json2csv-Documentation)
#### Promisified Version: json2csvPromisified(array, options).then(...).catch(...);
#### Promisified Version: `converter.json2csvPromisified(array, options)`
Available in version `2.2.0`, this functionality makes use of promises from the `bluebird` module.
#### csv2json(csv, callback, options)
#### `converter.csv2json(csv, callback, options)`

@@ -96,3 +99,3 @@ * `csv` - A string of CSV

#### Promisified Version: csv2jsonPromisified(csv, options).then(...).catch(...);
#### Promisified Version: `csv2jsonPromisified(csv, options)`

@@ -116,6 +119,6 @@ Available in version `2.2.0`, this functionality makes use of promises from the `bluebird` module.

```
Statements : 94.91% ( 205/216 )
Branches : 93.33% ( 154/165 )
Functions : 100% ( 37/37 )
Lines : 95.59% ( 195/204 )
Statements : 94.69% ( 196/207 )
Branches : 93.55% ( 145/155 )
Functions : 100% ( 34/34 )
Lines : 95.38% ( 186/195 )
```

@@ -122,0 +125,0 @@

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