From ca3095ff8d800c33881420073dea46badef6682c Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sat, 21 Jun 2014 14:00:24 -0600 Subject: [PATCH] Removing files we're not ready for yet --- LICENSE | 20 -- README.md | 52 ---- bower.json | 36 --- jquery.parse.js | 642 -------------------------------------------- jquery.parse.min.js | 6 - parse.jquery.json | 41 --- 6 files changed, 797 deletions(-) delete mode 100644 LICENSE delete mode 100644 README.md delete mode 100644 bower.json delete mode 100644 jquery.parse.js delete mode 100644 jquery.parse.min.js delete mode 100644 parse.jquery.json diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 5402f7c..0000000 --- a/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Matt - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index f25fd1f..0000000 --- a/README.md +++ /dev/null @@ -1,52 +0,0 @@ -Parse CSV with Javascript -======================================== - -[![mholt on Gittip](http://img.shields.io/badge/tips-accepted-brightgreen.svg?style=flat)](https://www.gittip.com/mholt/) - - -Papa Parse (formerly the jQuery Parse Plugin) is a robust and powerful CSV (character-separated values) parser with these features: - -- Parses delimited text strings without any fuss -- Attach to `` elements to load and parse files from disk -- Automatically detects delimiter (or specify a delimiter yourself) -- Supports streaming large inputs -- Utilize the header row, if present -- Gracefully handles malformed data -- Optional dynamic typing so that numeric data is parsed as numbers -- Descriptive and contextual errors - - -Demo ----- - -Visit **[PapaParse.com](http://papaparse.com/#demo)** to give Papa a whirl! - - - -Get Started ------------ - -Use [jquery.parse.min.js](https://github.com/mholt/jquery.parse/blob/master/jquery.parse.min.js) for production. - -For usage instructions, see the [homepage](http://papaparse.com) and, for more detail, the [documentation](http://papaparse.com/docs.html). - - - -Tests ------ - -The Parser component is under test. Download this repository and open `tests.html` in your browser to run them. - - - -Contributing ------------- - -If you'd like to see a feature or bug fix, pull down the code and submit a pull request. But remember, if you're changing anything in the Parser function, a pull request, *with test*, is best. (All changes to the parser component should be validated with tests.) You may also open issues for discussion or join in on Twitter with [#PapaParse](https://twitter.com/search?q=%23PapaParse&src=typd&f=realtime) - - - -Origins -------- - -Papa Parse is the result of an experiment by [SmartyStreets](http://smartystreets.com) which matured into a fully-featured, independent jQuery plugin. Wanting to enhance the demo on their homepage, SmartyStreets looked into ways to simulate their list service. This involved processing at least part of a potentially large delimited text file. And what else? They wanted to do it without requiring a file upload (for simplicity and to alleviate privacy concerns). No suitable solutions were found, so they built their own. After finding it successful, the code was brought out into this jQuery plugin, now known as Papa Parse. diff --git a/bower.json b/bower.json deleted file mode 100644 index 4aebbb3..0000000 --- a/bower.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "Papa-Parse", - "main": "jquery.parse.js", - "homepage": "http://papaparse.com", - "authors": [ - "Matthew Holt" - ], - "description": "Papa is a powerful CSV (delimited text) parser", - "keywords": [ - "csv", - "parse", - "parsing", - "parser", - "delimited", - "text", - "data", - "auto-detect", - "comma", - "tab", - "pipe", - "file", - "filereader", - "stream" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "dependencies": { - "jquery": ">=1.6.0" - } -} diff --git a/jquery.parse.js b/jquery.parse.js deleted file mode 100644 index 07bef71..0000000 --- a/jquery.parse.js +++ /dev/null @@ -1,642 +0,0 @@ -/* - Papa Parse - v2.1.4 - https://github.com/mholt/jquery.parse -*/ - -(function($) -{ - "use strict"; - - $.fn.parse = function(options) - { - var config = options.config || {}; - var queue = []; - - this.each(function(idx) - { - var supported = $(this).prop('tagName').toUpperCase() == "INPUT" - && $(this).attr('type') == "file" - && window.FileReader; - - if (!supported) - return true; // continue to next input element - - var instanceConfig = $.extend({}, config); // This copy is very important - - if (!this.files || this.files.length == 0) - { - error("NoFileError", undefined, this); - return true; // continue to next input element - } - - for (var i = 0; i < this.files.length; i++) - queue.push({ - file: this.files[i], - inputElem: this, - instanceConfig: instanceConfig - }); - - if (queue.length > 0) - parseFile(queue[0]); - }); - - return this; - - - function parseFile(f) - { - var completeFunc = complete, errorFunc; - - if (isFunction(options.error)) - errorFunc = function() { options.error(reader.error, f.file, f.inputElem); }; - if (isFunction(options.complete)) - completeFunc = function(results, file, inputElem, event) { options.complete(results, file, inputElem, event); complete(); }; - - if (isFunction(options.before)) - { - var returned = options.before(f.file, f.inputElem); - - if (typeof returned === 'object') - f.instanceConfig = $.extend(f.instanceConfig, returned); - else if (returned === "skip") - return complete(); // Proceeds to next file - else if (returned === false) - { - error("AbortError", f.file, f.inputElem); - return; // Aborts all queued files immediately - } - } - - if (f.instanceConfig.step) - { - var streamer = new Streamer(f.file, { - inputElem: f.inputElem, - config: $.extend({}, f.instanceConfig) // This copy is very important - }); - streamer.stream(completeFunc, errorFunc); - } - else - { - var reader = new FileReader(); - reader.onerror = errorFunc; - reader.onload = function(event) - { - var text = event.target.result; - var results = $.parse(text, f.instanceConfig); - completeFunc(results, f.file, f.inputElem, event); - }; - reader.readAsText(f.file, f.instanceConfig.encoding); - } - } - - function error(name, file, elem) - { - if (isFunction(options.error)) - options.error({name: name}, file, elem); - } - - function complete() - { - queue.splice(0, 1); - if (queue.length > 0) - parseFile(queue[0]); - } - }; - - $.parse = function(input, options) - { - var parser = new Parser(options); - return parser.parse(input); - }; - - function isFunction(func) { return typeof func === 'function'; } - - // Streamer is a wrapper over Parser to handle chunking the input file - function Streamer(file, settings) - { - if (!settings) - settings = {}; - - if (!settings.chunkSize) - settings.chunkSize = 1024 * 1024 * 5; // 5 MB - - if (settings.config.step) // it had better be there...! - { - var userStep = settings.config.step; - settings.config.step = function(data) { return userStep(data, file, settings.inputElem); }; - } - - var start = 0; - var aggregate = ""; - var partialLine = ""; - var parser = new Parser(settings.config); - var reader = new FileReader(); - - reader.onload = blobLoaded; - reader.onerror = blobError; - - this.stream = function(completeCallback, fileErrorCallback) - { - settings.onComplete = completeCallback; - settings.onFileError = fileErrorCallback; - nextChunk(); - }; - - function blobLoaded(event) - { - aggregate += partialLine + event.target.result; - partialLine = ""; - - if (start < file.size) - { - var lastLineEnd = aggregate.lastIndexOf("\n"); - - if (lastLineEnd < 0) - lastLineEnd = aggregate.lastIndexOf("\r"); - - if (lastLineEnd > -1) - { - partialLine = aggregate.substring(lastLineEnd + 1); // skip the line ending character - aggregate = aggregate.substring(0, lastLineEnd); - } - else - { - // For chunk sizes smaller than a line (a line could not fit in a single chunk) - // we simply build our aggregate by reading in the next chunk, until we find a newline - nextChunk(); - return; - } - } - - var results = parser.parse(aggregate); - aggregate = ""; - - if (start >= file.size) - return done(event); - else if (results.errors.abort) - return; - else - nextChunk(); - } - - function done(event) - { - if (typeof settings.onComplete === 'function') - settings.onComplete(undefined, file, settings.inputElem, event); - } - - function blobError() - { - if (typeof settings.onFileError === 'function') - settings.onFileError(reader.error, file, settings.inputElem); - } - - function nextChunk() - { - if (start < file.size) - { - reader.readAsText(file.slice(start, Math.min(start + settings.chunkSize, file.size)), settings.config.encoding); - start += settings.chunkSize; - } - }; - } - - // Parser is the actual parsing component. - // It is under test and does not depend on jQuery. - // You could rip this entire function out of the plugin - // and use it independently (with attribution). - function Parser(config) - { - var self = this; - var _invocations = 0; - var _input = ""; - var _chunkOffset = 0; - var _abort = false; - var _config = {}; - var _state = freshState(); - var _defaultConfig = { - delimiter: "", - header: true, - dynamicTyping: true, - preview: 0 - }; - var _regex = { - floats: /^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i, - empty: /^\s*$/ - }; - - config = validConfig(config); - _config = { - delimiter: config.delimiter, - header: config.header, - dynamicTyping: config.dynamicTyping, - preview: config.preview, - step: config.step - }; - - this.parse = function(input) - { - if (typeof input !== 'string') - return returnable(); - - reset(input); - - if (!_config.delimiter && !guessDelimiter(input)) - { - addError("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to comma", "config"); - _config.delimiter = ","; - } - - for (_state.i = 0; _state.i < _input.length; _state.i++) - { - if (_abort || (_config.preview > 0 && _state.lineNum > _config.preview)) - break; - - _state.ch = _input[_state.i]; - _state.line += _state.ch; - - if (_state.ch == '"') - handleQuote(); - else if (_state.inQuotes) - inQuotes(); - else - notInQuotes(); - } - - if (_abort) - addError("Abort", "ParseAbort", "Parsing was aborted by the user's step function", "abort"); - else - { - endRow(); // End of input is also end of the last row - if (_state.inQuotes) - addError("Quotes", "MissingQuotes", "Unescaped or mismatched quotes"); - } - - return returnable(); - }; - - this.getOptions = function() - { - return { - delimiter: _config.delimiter, - header: _config.header, - dynamicTyping: _config.dynamicTyping, - preview: _config.preview, - step: _config.step - }; - }; - - function validConfig(config) - { - if (typeof config !== 'object') - config = {}; - - if (typeof config.delimiter !== 'string' - || config.delimiter.length != 1) - config.delimiter = _defaultConfig.delimiter; - - if (config.delimiter == '"' || config.delimiter == "\n") - config.delimiter = _defaultConfig.delimiter; - - if (typeof config.header !== 'boolean') - config.header = _defaultConfig.header; - - if (typeof config.dynamicTyping !== 'boolean') - config.dynamicTyping = _defaultConfig.dynamicTyping; - - if (typeof config.preview !== 'number') - config.preview = _defaultConfig.preview; - - if (typeof config.step !== 'function') - config.step = _defaultConfig.step; - - return config; - } - - function guessDelimiter(input) - { - var recordSep = String.fromCharCode(30); - var unitSep = String.fromCharCode(31); - var delimiters = [",", "\t", "|", ";", recordSep, unitSep]; - var bestDelim, bestDelta, fieldCountPrevRow; - - for (var i = 0; i < delimiters.length; i++) - { - var delim = delimiters[i]; - var delta = 0, avgFieldCount = 0; - - var preview = new Parser({ - delimiter: delim, - header: false, - dynamicTyping: false, - preview: 10 - }).parse(input); - - for (var j = 0; j < preview.results.length; j++) - { - var fieldCount = preview.results[j].length; - avgFieldCount += fieldCount; - - if (typeof fieldCountPrevRow === 'undefined') - { - fieldCountPrevRow = fieldCount; - continue; - } - else if (fieldCount > 1) - { - delta += Math.abs(fieldCount - fieldCountPrevRow); - fieldCountPrevRow = fieldCount; - } - } - - avgFieldCount /= preview.results.length; - - if ((typeof bestDelta === 'undefined' || delta < bestDelta) - && avgFieldCount > 1.99) - { - bestDelta = delta; - bestDelim = delim; - } - } - - _config.delimiter = bestDelim; - - return !!bestDelim; - } - - function handleQuote() - { - var delimBefore = (_state.i > 0 && isBoundary(_state.i-1)) - || _state.i == 0; - var delimAfter = (_state.i < _input.length - 1 && isBoundary(_state.i+1)) - || _state.i == _input.length - 1; - var escaped = _state.i < _input.length - 1 - && _input[_state.i+1] == '"'; - - if (_state.inQuotes && escaped) - { - _state.fieldVal += '"'; - _state.i++; - } - else if (delimBefore || delimAfter) - _state.inQuotes = !_state.inQuotes; - else - addError("Quotes", "UnexpectedQuotes", "Unexpected quotes"); - } - - function inQuotes() - { - appendCharToField(); - } - - function appendCharToField() - { - _state.fieldVal += _state.ch; - } - - function notInQuotes() - { - if (_state.ch == _config.delimiter) - saveValue(); - else if ((_state.ch == "\r" && _state.i < _input.length - 1 - && _input[_state.i+1] == "\n") - || (_state.ch == "\n" && _state.i < _input.length - 1 - && _input[_state.i+1] == "\r")) - { - newRow(); - _state.i++; - } - else if (_state.ch == "\r" || _state.ch == "\n") - newRow(); - else - appendCharToField(); - } - - function isBoundary(i) - { - return _input[i] == _config.delimiter - || _input[i] == "\n" - || _input[i] == "\r"; - } - - function saveValue() - { - if (_config.header) - { - if (_state.lineNum == 1 && _invocations == 1) - _state.parsed.fields.push(_state.fieldVal); - else - { - var currentRow = _state.parsed.rows[_state.parsed.rows.length - 1]; - var fieldName = _state.parsed.fields[_state.field]; - if (fieldName) - { - if (_config.dynamicTyping) - _state.fieldVal = tryParseFloat(_state.fieldVal); - currentRow[fieldName] = _state.fieldVal; - } - else - { - if (typeof currentRow.__parsed_extra === 'undefined') - currentRow.__parsed_extra = []; - currentRow.__parsed_extra.push(_state.fieldVal); - } - } - } - else - { - if (_config.dynamicTyping) - _state.fieldVal = tryParseFloat(_state.fieldVal); - _state.parsed[_state.parsed.length - 1].push(_state.fieldVal); - } - - _state.fieldVal = ""; - _state.field ++; - } - - function newRow() - { - endRow(); - - if (streaming()) - { - _state.errors = {}; - _state.errors.length = 0; - } - - if (_config.header) - { - if (_state.lineNum > 0) - { - if (streaming()) - _state.parsed.rows = [ {} ]; - else - _state.parsed.rows.push({}); - } - } - else - { - if (streaming()) - _state.parsed = [ [] ]; - else if (!_config.header) - _state.parsed.push([]); - } - - _state.lineNum++; - _state.line = ""; - _state.field = 0; - } - - function endRow() - { - if (_abort) - return; - - saveValue(); - - var emptyLine = trimEmptyLine(); - - if (!emptyLine && _config.header) - inspectFieldCount(); - - if (streaming() && (!_config.header || - (_config.header && _state.parsed.rows.length > 0))) - { - var keepGoing = _config.step(returnable()); - if (keepGoing === false) - _abort = true; - } - } - - function streaming() - { - return typeof _config.step === 'function'; - } - - function tryParseFloat(num) - { - var isNumber = _regex.floats.test(num); - return isNumber ? parseFloat(num) : num; - } - - function trimEmptyLine() - { - if (_regex.empty.test(_state.line)) - { - if (_config.header) - { - if (_state.lineNum == 1) - { - _state.parsed.fields = []; - _state.lineNum--; - } - else - _state.parsed.rows.splice(_state.parsed.rows.length - 1, 1); - } - else - _state.parsed.splice(_state.parsed.length - 1, 1); - - return true; - } - return false; - } - - function inspectFieldCount() - { - if (!_config.header) - return true; - - if (_state.parsed.rows.length == 0) - return true; - - var expected = _state.parsed.fields.length; - - // Actual field count tabulated manually because IE<9 doesn't support Object.keys - var actual = 0; - var lastRow = _state.parsed.rows[_state.parsed.rows.length - 1]; - for (var prop in lastRow) - if (lastRow.hasOwnProperty(prop)) - actual++; - - if (actual < expected) - return addError("FieldMismatch", "TooFewFields", "Too few fields: expected " + expected + " fields but parsed " + actual); - else if (actual > expected) - return addError("FieldMismatch", "TooManyFields", "Too many fields: expected " + expected + " fields but parsed " + actual); - return true; - } - - function addError(type, code, msg, errKey) - { - var row = _config.header - ? (_state.parsed.rows.length ? _state.parsed.rows.length - 1 : undefined) - : _state.parsed.length - 1; - var key = errKey || row; - - if (typeof _state.errors[key] === 'undefined') - _state.errors[key] = []; - - _state.errors[key].push({ - type: type, - code: code, - message: msg, - line: _state.lineNum, - row: row, - index: _state.i + _chunkOffset - }); - - _state.errors.length ++; - - return false; - } - - function returnable() - { - return { - results: _state.parsed, - errors: _state.errors, - meta: { - delimiter: _config.delimiter - } - }; - } - - function reset(input) - { - _invocations++; - if (_invocations > 1 && streaming()) - _chunkOffset += input.length; - _state = freshState(); - _input = input; - } - - function freshState() - { - // If streaming, and thus parsing the input in chunks, this - // is careful to preserve what we've already got, when necessary. - var parsed; - if (_config.header) - { - parsed = { - fields: streaming() ? _state.parsed.fields || [] : [], - rows: streaming() && _invocations > 1 ? [ {} ] : [] - }; - } - else - parsed = [ [] ]; - - return { - i: 0, - lineNum: streaming() ? _state.lineNum : 1, - field: 0, - fieldVal: "", - line: "", - ch: "", - inQuotes: false, - parsed: parsed, - errors: { length: 0 } - }; - } - } - -})(jQuery); diff --git a/jquery.parse.min.js b/jquery.parse.min.js deleted file mode 100644 index 67a6d92..0000000 --- a/jquery.parse.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - Papa Parse - v2.1.4 - https://github.com/mholt/jquery.parse -*/ -;(function(e){"use strict";function t(e){return typeof e==="function"}function n(e,t){function f(t){s+=o+t.target.result;o="";if(i-1){o=s.substring(n+1);s=s.substring(0,n)}else{h();return}}var r=u.parse(s);s="";if(i>=e.size)return l(t);else if(r.errors.abort)return;else h()}function l(n){if(typeof t.onComplete==="function")t.onComplete(undefined,e,t.inputElem,n)}function c(){if(typeof t.onFileError==="function")t.onFileError(a.error,e,t.inputElem)}function h(){if(i1){c+=Math.abs(v-a);a=v}}h/=p.results.length;if((typeof o==="undefined"||c1.99){o=c;s=l}}u.delimiter=s;return!!s}function p(){var e=a.i>0&&g(a.i-1)||a.i==0;var t=a.i0){if(E())a.parsed.rows=[{}];else a.parsed.rows.push({})}}else{if(E())a.parsed=[[]];else if(!u.header)a.parsed.push([])}a.lineNum++;a.line="";a.field=0}function w(){if(o)return;y();var e=x();if(!e&&u.header)T();if(E()&&(!u.header||u.header&&a.parsed.rows.length>0)){var t=u.step(C());if(t===false)o=true}}function E(){return typeof u.step==="function"}function S(e){var t=l.floats.test(e);return t?parseFloat(e):e}function x(){if(l.empty.test(a.line)){if(u.header){if(a.lineNum==1){a.parsed.fields=[];a.lineNum--}else a.parsed.rows.splice(a.parsed.rows.length-1,1)}else a.parsed.splice(a.parsed.length-1,1);return true}return false}function T(){if(!u.header)return true;if(a.parsed.rows.length==0)return true;var e=a.parsed.fields.length;var t=0;var n=a.parsed.rows[a.parsed.rows.length-1];for(var r in n)if(n.hasOwnProperty(r))t++;if(te)return N("FieldMismatch","TooManyFields","Too many fields: expected "+e+" fields but parsed "+t);return true}function N(e,t,n,r){var i=u.header?a.parsed.rows.length?a.parsed.rows.length-1:undefined:a.parsed.length-1;var o=r||i;if(typeof a.errors[o]==="undefined")a.errors[o]=[];a.errors[o].push({type:e,code:t,message:n,line:a.lineNum,row:i,index:a.i+s});a.errors.length++;return false}function C(){return{results:a.parsed,errors:a.errors,meta:{delimiter:u.delimiter}}}function k(e){n++;if(n>1&&E())s+=e.length;a=L();i=e}function L(){var e;if(u.header){e={fields:E()?a.parsed.fields||[]:[],rows:E()&&n>1?[{}]:[]}}else e=[[]];return{i:0,lineNum:E()?a.lineNum:1,field:0,fieldVal:"",line:"",ch:"",inQuotes:false,parsed:e,errors:{length:0}}}var t=this;var n=0;var i="";var s=0;var o=false;var u={};var a=L();var f={delimiter:"",header:true,dynamicTyping:true,preview:0};var l={floats:/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,empty:/^\s*$/};e=c(e);u={delimiter:e.delimiter,header:e.header,dynamicTyping:e.dynamicTyping,preview:e.preview,step:e.step};this.parse=function(e){if(typeof e!=="string")return C();k(e);if(!u.delimiter&&!h(e)){N("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to comma","config");u.delimiter=","}for(a.i=0;a.i0&&a.lineNum>u.preview)break;a.ch=i[a.i];a.line+=a.ch;if(a.ch=='"')p();else if(a.inQuotes)d();else m()}if(o)N("Abort","ParseAbort","Parsing was aborted by the user's step function","abort");else{w();if(a.inQuotes)N("Quotes","MissingQuotes","Unescaped or mismatched quotes")}return C()};this.getOptions=function(){return{delimiter:u.delimiter,header:u.header,dynamicTyping:u.dynamicTyping,preview:u.preview,step:u.step}}}e.fn.parse=function(r){function o(i){var s=a,o;if(t(r.error))o=function(){r.error(c.error,i.file,i.inputElem)};if(t(r.complete))s=function(e,t,n,i){r.complete(e,t,n,i);a()};if(t(r.before)){var f=r.before(i.file,i.inputElem);if(typeof f==="object")i.instanceConfig=e.extend(i.instanceConfig,f);else if(f==="skip")return a();else if(f===false){u("AbortError",i.file,i.inputElem);return}}if(i.instanceConfig.step){var l=new n(i.file,{inputElem:i.inputElem,config:e.extend({},i.instanceConfig)});l.stream(s,o)}else{var c=new FileReader;c.onerror=o;c.onload=function(t){var n=t.target.result;var r=e.parse(n,i.instanceConfig);s(r,i.file,i.inputElem,t)};c.readAsText(i.file,i.instanceConfig.encoding)}}function u(e,n,i){if(t(r.error))r.error({name:e},n,i)}function a(){s.splice(0,1);if(s.length>0)o(s[0])}var i=r.config||{};var s=[];this.each(function(t){var n=e(this).prop("tagName").toUpperCase()=="INPUT"&&e(this).attr("type")=="file"&&window.FileReader;if(!n)return true;var r=e.extend({},i);if(!this.files||this.files.length==0){u("NoFileError",undefined,this);return true}for(var a=0;a0)o(s[0])});return this};e.parse=function(e,t){var n=new r(t);return n.parse(e)}})(jQuery); \ No newline at end of file diff --git a/parse.jquery.json b/parse.jquery.json deleted file mode 100644 index d12367a..0000000 --- a/parse.jquery.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "parse", - "version": "2.1.4", - "title": "Papa Parse", - "description": "Papa is a powerful CSV (delimited text) parser that streams large files and gracefully handles malformed input.", - "keywords": [ - "csv", - "parse", - "parsing", - "parser", - "delimited", - "text", - "data", - "auto-detect", - "comma", - "tab", - "pipe", - "file", - "filereader", - "stream", - "encoding" - ], - "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", - "download": "https://raw.github.com/mholt/jquery.parse/master/jquery.parse.min.js", - "dependencies": { - "jquery": ">=1.6.0" - } -} \ No newline at end of file