1.0.2 • Published 5 years ago

ember-csv v1.0.2

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

ember-csv

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:

{{component "ember-csv@file-anchor" data=data}}
// 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

Installation

ember install csv-anchor

Usage

You can override the downloaded file name by specifying the fileName argument:

{{component "ember-csv@file-anchor"
  data=data
  fileName="foobar"
}}

...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).

Contributing

Installation

  • git clone <repository-url>
  • cd csv-anchor
  • npm install

Linting

  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • npm test – Runs ember try:each to test your addon against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

License

This project is licensed under the MIT License

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.0

6 years ago