Sorry, time constraints have stopped from keeping track of this package. I recommend you look for alternatives on atmospherejs.
Parse CSV (Comma Separated Values) to Javascript arrays or dictionaries
Note: The JQuery-CSV.js file has been slightly modified from the official released version. This was to add in a 'headerIndex' option to the toObjects(..) method.
I am using this library for client side parsing of CSV files. If you are looking for server-side parsing, more complete NPM solutions can be found here.
Client-Side: (ie. browser) - import via the script element.
<script src="jquery-csv.js"></ script>
Server-Side: (ie. Node.js) - Import via the standard CommonJS approach.
var $ = jQuery = require('jquery');
require('./jquery.csv.js');
A basic usage example can be found here.
Each one of the JQuery-CSV methods can be called with the following form:
$.csv.function(csv, {options}, callback);
csv (required) - The csv data to be transformed.
options (optional) - An object containing user-defined overrides for the default options.
callback (optional) - Used for Node.js-style async callbacks. Uses the form function(err, data).
toArray
Parse a single entry string to an array
$.csv.toArray(csv);
toArrays
Parse a multi-line CSV string to a 2D array
$.csv.toArrays(csv);
toObjects
Parse a multi-line CSV string to an array of objects
$.csv.toObjects(csv);
- NPM
- Install Meteorite:
npm install -g meteorite
- Create your project:
mrt create mynewapp
- Add jquery-csv:
mrt add jquery-csv
Thanks to AdaptiveLab for the smart package template