This addon provides ember CSV utilities.
Currently, it just provides a component for generating a download anchor based on CSV modeled data. So, doing this:
// 2D array of CSV rows
this.set('data', [
['First Name', 'Last Name'],
['Foo', 'Bar']
]);
...would yield something like this:
<a href="<data-uri-generated-here>">
Download CSV file
</a>
...and opening the file downloaded from that anchor would yield this:
First Name,Last Name
Foo,Bar
ember install csv-anchor
You can override the downloaded file name by specifying the fileName
argument:
...with this argument, the download will show up as foobar.csv
on your computer.
You can always play with the dummy app for usage details (See contributing).
git clone <repository-url>
cd csv-anchor
npm install
npm run lint:js
npm run lint:js -- --fix
ember test
– Runs the test suite on the current Ember versionember test --server
– Runs the test suite in "watch mode"npm test
– Runsember try:each
to test your addon against multiple Ember versions
ember serve
- Visit the dummy application at http://localhost:4200.
For more information on using ember-cli, visit https://ember-cli.com/.
This project is licensed under the MIT License