JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 40617
  • Score
    100M100P100Q159898F
  • License MIT

Easily generate csv downloads of your json data.

Package Exports

  • json-to-csv-export

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (json-to-csv-export) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

⌗ 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!