Browse Source

Let's stamp version 3.0 on it and see what happens

pull/62/head
Matthew Holt 11 years ago
parent
commit
f5eab684ec
  1. 4
      README.md
  2. 6
      bower.json
  3. 2
      papaparse.js
  4. 6
      papaparse.min.js
  5. 45
      parse.jquery.json
  6. 22
      tests/test-cases.js

4
README.md

@ -30,7 +30,7 @@ Visit **[PapaParse.com/demo.html](http://papaparse.com/demo.html)** to try Papa!
Get Started Get Started
----------- -----------
Use [papaparse.min.js](https://github.com/mholt/jquery.parse/blob/master/papaparse.min.js) for production. Use [papaparse.min.js](https://github.com/mholt/PapaParse/blob/master/papaparse.min.js) for production.
For usage instructions, see the [homepage](http://papaparse.com) and, for more detail, the [documentation](http://papaparse.com/docs.html). For usage instructions, see the [homepage](http://papaparse.com) and, for more detail, the [documentation](http://papaparse.com/docs.html).
@ -46,7 +46,7 @@ Papa Parse is under test (especially its core Parser). Download this repository
Contributing Contributing
------------ ------------
To discuss a new feature or ask a question, open an issue. To fix a bug, submit a pull request to be credited with the [contributors](https://github.com/mholt/jquery.parse/graphs/contributors)! Remember, a pull request, *with test*, is best. (Especially all changes to the Parser component should be validated with tests.) You may also discuss on Twitter with [#PapaParse](https://twitter.com/search?q=%23PapaParse&src=typd&f=realtime) or directly to me, [@mholt6](https://twitter.com/mholt6). To discuss a new feature or ask a question, open an issue. To fix a bug, submit a pull request to be credited with the [contributors](https://github.com/mholt/PapaParse/graphs/contributors)! Remember, a pull request, *with test*, is best. (Especially all changes to the Parser component should be validated with tests.) You may also discuss on Twitter with [#PapaParse](https://twitter.com/search?q=%23PapaParse&src=typd&f=realtime) or directly to me, [@mholt6](https://twitter.com/mholt6).

6
bower.json

@ -20,7 +20,11 @@
"pipe", "pipe",
"file", "file",
"filereader", "filereader",
"stream" "stream",
"workers",
"ajax",
"threading",
"multi-threaded"
], ],
"license": "MIT", "license": "MIT",
"ignore": [ "ignore": [

2
papaparse.js

@ -1,6 +1,6 @@
/* /*
Papa Parse Papa Parse
v3.0.0 alpha - MAY BE UNSTABLE - STILL IN DEVELOPMENT v3.0.0
https://github.com/mholt/PapaParse https://github.com/mholt/PapaParse
*/ */
(function(global) (function(global)

6
papaparse.min.js vendored

File diff suppressed because one or more lines are too long

45
parse.jquery.json

@ -0,0 +1,45 @@
{
"name": "parse",
"version": "3.0.0",
"title": "Papa Parse",
"description": "Powerful CSV parser that converts CSV to JSON and JSON to CSV. Supports web workers and streaming large files. Gracefully handles malformed input.",
"keywords": [
"csv",
"parse",
"parsing",
"parser",
"delimited",
"text",
"data",
"auto-detect",
"comma",
"tab",
"pipe",
"file",
"filereader",
"stream",
"encoding",
"workers",
"multi-threaded",
"threading",
"ajax"
],
"author": {
"name": "Matthew Holt",
"email": "mholt@users.noreply.github.com",
"url": "http://mwholt.com"
},
"licenses": [
{
"type": "MIT",
"url": "http://opensource.org/licenses/MIT"
}
],
"homepage":"http://papaparse.com",
"docs": "http://papaparse.com/docs.html",
"demo": "http://papaparse.com/demo.html",
"download": "https://raw.github.com/mholt/PapaParse/master/papaparse.min.js",
"dependencies": {
"jquery": ">=1.6.0"
}
}

22
tests/test-cases.js

@ -161,12 +161,12 @@ var TESTS = [
} }
}, },
{ {
input: 'aDELIMbDELIMc', input: 'a,b,c',
config: { delimiter: "DELIM" }, config: { delimiter: "DELIM" },
description: "Bad delimiter", description: "Bad delimiter",
notes: "Should silently default to comma", notes: "Should silently default to comma",
expected: { expected: {
data: [['aDELIMbDELIMc']], data: [['a', 'b', 'c']],
errors: [] errors: []
} }
}, },
@ -218,7 +218,7 @@ var TESTS = [
}, },
{ {
input: '#commented line\r\n', input: '#commented line\r\n',
config: { comments: true }, config: { comments: true, delimiter: ',' },
description: "Input with only a commented line (comments: true)", description: "Input with only a commented line (comments: true)",
expected: { expected: {
data: [], data: [],
@ -227,6 +227,7 @@ var TESTS = [
}, },
{ {
input: '#commented line', input: '#commented line',
config: { delimiter: ',' },
description: "Input with comment without comments enabled", description: "Input with comment without comments enabled",
expected: { expected: {
data: [['#commented line']], data: [['#commented line']],
@ -235,6 +236,7 @@ var TESTS = [
}, },
{ {
input: 'a\r\n b\r\nc', input: 'a\r\n b\r\nc',
config: { delimiter: ',' },
description: "Input without comments with line starting with whitespace", description: "Input without comments with line starting with whitespace",
notes: "\" \" == false, but \" \" !== false, so === comparison is required", notes: "\" \" == false, but \" \" !== false, so === comparison is required",
expected: { expected: {
@ -313,7 +315,11 @@ var TESTS = [
description: "Empty input string", description: "Empty input string",
expected: { expected: {
data: [], data: [],
errors: [] errors: [{
"type": "Delimiter",
"code": "UndetectableDelimiter",
"message": "Unable to auto-detect delimiting character; defaulted to comma"
}]
} }
}, },
{ {
@ -329,7 +335,13 @@ var TESTS = [
description: "Input is just a string (a single field)", description: "Input is just a string (a single field)",
expected: { expected: {
data: [['Abc def']], data: [['Abc def']],
errors: [] errors: [
{
"type": "Delimiter",
"code": "UndetectableDelimiter",
"message": "Unable to auto-detect delimiting character; defaulted to comma"
}
]
} }
}, },
{ {

Loading…
Cancel
Save