Browse Source

Undo Safari regression (fixes #117)

pull/124/head 4.0.6
Matthew Holt 10 years ago
parent
commit
1d8d406205
  1. 2
      bower.json
  2. 2
      package.json
  3. 8
      papaparse.js
  4. 4
      papaparse.min.js
  5. 2
      parse.jquery.json

2
bower.json

@ -1,6 +1,6 @@
{ {
"name": "Papa-Parse", "name": "Papa-Parse",
"version": "4.0.5", "version": "4.0.6",
"main": "papaparse.js", "main": "papaparse.js",
"homepage": "http://papaparse.com", "homepage": "http://papaparse.com",
"authors": [ "authors": [

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "papaparse", "name": "papaparse",
"version": "4.0.5", "version": "4.0.6",
"description": "Fast and powerful CSV parser for the browser that supports web workers and streaming large files. Converts CSV to JSON and JSON to CSV.", "description": "Fast and powerful CSV parser for the browser that supports web workers and streaming large files. Converts CSV to JSON and JSON to CSV.",
"keywords": [ "keywords": [
"csv", "csv",

8
papaparse.js

@ -1,6 +1,6 @@
/* /*
Papa Parse Papa Parse
v4.0.5 v4.0.6
https://github.com/mholt/PapaParse https://github.com/mholt/PapaParse
*/ */
(function(global) (function(global)
@ -196,7 +196,7 @@
return results; return results;
} }
} }
else if (_input instanceof File) else if ((global.File && _input instanceof File) || _input instanceof Object) // ...Safari. (see issue #106)
{ {
if (config.step || config.chunk) if (config.step || config.chunk)
{ {
@ -618,7 +618,7 @@
// FileReader is better than FileReaderSync (even in worker) - see http://stackoverflow.com/q/24708649/1048862 // FileReader is better than FileReaderSync (even in worker) - see http://stackoverflow.com/q/24708649/1048862
// But Firefox is a pill, too - see issue #76: https://github.com/mholt/PapaParse/issues/76 // But Firefox is a pill, too - see issue #76: https://github.com/mholt/PapaParse/issues/76
var usingAsyncReader = typeof FileReader === 'function'; var usingAsyncReader = typeof FileReader !== 'undefined'; // Safari doesn't consider it a function - see issue #105
this.stream = function(f) this.stream = function(f)
{ {
@ -1419,7 +1419,7 @@
finished: true finished: true
}); });
} }
else if (msg.input instanceof File) else if ((global.File && msg.input instanceof File) || msg.input instanceof Object) // thank you, Safari (see issue #106)
{ {
var results = Papa.parse(msg.input, msg.config); var results = Papa.parse(msg.input, msg.config);
if (results) if (results)

4
papaparse.min.js vendored

File diff suppressed because one or more lines are too long

2
parse.jquery.json

@ -1,6 +1,6 @@
{ {
"name": "parse", "name": "parse",
"version": "4.0.5", "version": "4.0.6",
"title": "Papa Parse", "title": "Papa Parse",
"description": "Powerful CSV parser that converts CSV to JSON and JSON to CSV. Supports web workers and streaming large files. Fastest CSV parser for JavaScript.", "description": "Powerful CSV parser that converts CSV to JSON and JSON to CSV. Supports web workers and streaming large files. Fastest CSV parser for JavaScript.",
"keywords": [ "keywords": [

Loading…
Cancel
Save