jquery-csv
Advanced tools
Comparing version 0.8.12 to 0.9.1
{ | ||
"name": "jquery-csv", | ||
"version": "0.8.12", | ||
"version": "0.9.1", | ||
"description": "A jQuery CSV parser plugin. Battle Tested | Optimized | 100% IETF RFC 4180 Complete", | ||
@@ -9,4 +9,10 @@ "author": { | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Colton Ehrman", | ||
"email": "coltonje95@gmail.com", | ||
"url": "http://coltonehrman.com" | ||
} | ||
], | ||
"devDependencies": { | ||
"jquery": "^3.0", | ||
"tap-spec": "^5.0.0", | ||
@@ -17,2 +23,3 @@ "tape": "^4.8.0" | ||
"scripts": { | ||
"start": "npx live-server", | ||
"test": "npx tape ./test/*.js | tap-spec", | ||
@@ -23,3 +30,3 @@ "lint": "npm run lint:htmlhint && npm run lint:semistandard", | ||
"minify": "npx uglify-js src/jquery.csv.js -o src/jquery.csv.min.js --compress --mangle", | ||
"preversion": "npm run test", | ||
"preversion": "npm run lint && npm run test", | ||
"postversion": "git push --follow-tags", | ||
@@ -26,0 +33,0 @@ "prepublish": "npm run lint && npm run test" |
@@ -8,20 +8,11 @@ [![GitHub release](https://img.shields.io/github/release/evanplaice/jquery-csv.svg)](https://github.com/evanplaice/jquery-csv/releases) | ||
*Notice: This is a continuation of the jquery-csv project hosted on Google Code.* | ||
# Introduction | ||
JavaScript is growing up and HTML is finally maturing the point where webapps are being built to completely displace desktop applications. It's about time that the supporting libraries grow up too. | ||
jQuery-csv is an artifact of a simpler time (ie 2012) when the JS library ecosystem was still very underdeveloped. This was the first and still is one of the fastest spec compliant CSV parsers available. | ||
Looking for a complete, end-to-end, battle tested, performance optimized CSV parser that's available in the familiar jQuery syntax style? Welcome... | ||
This is a complete, customizable, battle tested, performance optimized CSV parser that follows the traditional jQuery-style of syntax. Featuring a slim Chomsky - Type III parser implementation. Full (that means 100%) [IETF RFC 4180](http://tools.ietf.org/html/rfc4180) compliance. Including coverage for a few edge cases that even the spec fails to cover. | ||
This library is a different creature, featuring a slim Chomsky - Type III parser implementation. Full (that means 100%) [IETF RFC 4180](http://tools.ietf.org/html/rfc4180) compliance. Including coverage for a few edge cases that even the spec fails to cover. | ||
Enough with the wind-up... | ||
Want to see it in action? Check out the [Basic Usage Demo](http://evanplaice.github.io/jquery-csv/examples/basic-usage.html). | ||
Want more? The Use Cases section below has what you need. | ||
Aside: To the script kiddies... Don't be sad, we bet there are still plenty of people who would like to hear you outline the merits of `str.split()`. | ||
# Features | ||
@@ -121,22 +112,30 @@ | ||
What fun is having a shiny new library without examples to play with? | ||
Instead of the typical useless contrived example code, I have provided a handful of simple yet powerful demos. Not only are they fun to play with but a quick peak at the source will show you how simple and easy they were to implement. Feel free to copy and reuse these in your own projects. | ||
No fun that's what... That is coming from a guy who has spent entirely too much time mucking through API documentation when he'd much rather be out at the beach, surfing, or chasing girls. | ||
## Basic Usage | ||
Instead of the typical useless contrived example code, I have provided a handful of simple yet powerful demos. Not only are they fun to play with but a quick peak at the source will show you how simple and easy they were to implement. | ||
Want to play with the parser and maybe validate your CSV data without all the frills? No need to download the source first, there's a demo for that... | ||
Who knows... maybe this whole 'having fun' concept may spread to some of the other Open Source libraries as a result. One can dream... | ||
[jQuery-CSV - toArray()](http://evanplaice.github.io/jquery-csv/examples/to-array.html) | ||
## Basic Usage | ||
[jQuery-CSV - toArrays()](http://evanplaice.github.io/jquery-csv/examples/to-arrays.html) | ||
Want to play with the parser and maybe validate your CSV data without all the frills? No need to download the source first, there's a demo for that... | ||
[jQuery-CSV - fromArrays()](http://evanplaice.github.io/jquery-csv/examples/from-arrays.html) | ||
[jQuery-CSV - Basic Usage Demonstration](http://evanplaice.github.io/jquery-csv/examples/basic-usage.html) | ||
[jQuery-CSV - toObjects()](http://evanplaice.github.io/jquery-csv/examples/to-objects.html) | ||
## ESM Import | ||
[jQuery-CSV - fromObjects()](http://evanplaice.github.io/jquery-csv/examples/from-objects.html) | ||
Here is an example of how to import jquery-csv in ECMAScript: | ||
## Node.js ESM (EcmaScript Module) Import | ||
[jQuery-CSV - ESM Import Demonstration](http://evanplaice.github.io/jquery-csv/examples/esm-usage.js) | ||
Here's how to import jQuery-CSV as am ECMAScript module Node.js: | ||
[jQuery-CSV - ESM Import Demonstration](http://evanplaice.github.io/jquery-csv/examples/snippets/esm-usage.js) | ||
## Node.js CJS (CommonJS Module) Import | ||
Here's how to import jQuery-CSV as CommonJS module Node.js: | ||
[jQuery-CSV - CJS Import Demonstration](http://evanplaice.github.io/jquery-csv/examples/snippets/node-usage.js) | ||
## Client-Side File Handling | ||
@@ -170,18 +169,2 @@ | ||
## jQuery-CSV + Node.js | ||
What's better than a powerful JavaScript? platform in the browser. A second, even more powerful JavaScript? platform on the server. | ||
And... jQuery-CSV fully supports it. There is not online demo because it requires a Node.js server to run but a stub is provided to help get you started. | ||
Dependencies: | ||
To make this example work, you'll also need to install jQuery via the NPM. | ||
```npm install jquery``` | ||
The link to the stub: | ||
[node-usage.js](http://evanplaice.github.io/jquery-csv/examples/node-usage.js) | ||
**jQuery-CSV** coding style is inherited from the [JQuery Core Style Guidelines](https://contribute.jquery.org/style-guide/) | ||
@@ -188,0 +171,0 @@ |
2
49416
171