1.1.0 • Published 6 years ago

gulp-json2csv v1.1.0

Weekly downloads
35
License
MIT
Repository
github
Last release
6 years ago

gulp-json2csv

Gulp plugin to Convert json to csv format.

npm npm Build Status Known Vulnerabilities Greenkeeper badge npm

You can also use this package to convert json to excel format by simply renaming the output extension to excel's extension.

This plugin is backed by json2csv module.

Install

$ npm install --save-dev gulp-json2csv

Usage

const gulp = require('gulp');
const json2csv = require('gulp-json2csv');

gulp.task('default', function() {
	gulp
		.src('src/file.json')
		.pipe(json2csv())
		.pipe(gulp.dest('dist'));
});

Example

input:

[
	{
		"car": "Audi",
		"price": 40000,
		"color": "blue"
	},
	{
		"car": "BMW",
		"price": 35000,
		"color": "black"
	},
	{
		"car": "Porsche",
		"price": 60000,
		"color": "green"
	}
]

output =>

"car", "price", "color"
"Audi", 40000, "blue"
"BMW", 35000, "black"
"Porsche", 60000, "green"

Change log

  • 1.1.0
  • 1.0.3, 1.0.4, 1.0.5, 1.0.6
    • docs update

License

MIT © Vajahath Ahmed

1.1.0

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0-beta

7 years ago

1.0.0

7 years ago