Skip to content

A function to easily generate csv downloads of your json data. ✨

License

Notifications You must be signed in to change notification settings

farah/json-to-csv-export

 
 

Repository files navigation

⌗ json-to-csv-export

A function to easily generate csv downloads of your json data. ✨

npm package version  npm downloads  code style: prettier

Live Demo

https://json-to-csv-export.coston.io

Features

  • Create a csv download from json data
  • Lightweight
  • Easy to use
  • optional filename

Install

Install with npm:

npm i json-to-csv-export

Or load from a CDN:

<script src="https://cdn.jsdelivr.net/npm/json-to-csv-export"></script>

Example Usage

import csvDownload from 'json-to-csv-export'

...

  <button onClick={() => csvDownload(mockData)}>
    Download Data
  </button>

Arguments

# Argument Type Requirement Default Description
1 data object required null object or array of objects
2 filename string optional "export.csv" The complete filename

Contributing

Please help provide good data faster! Submit any issues and/or make a pull request!

About

A function to easily generate csv downloads of your json data. ✨

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 56.5%
  • HTML 43.5%