|
|
@ -1398,6 +1398,7 @@ License: MIT |
|
|
|
var step = config.step; |
|
|
|
var step = config.step; |
|
|
|
var preview = config.preview; |
|
|
|
var preview = config.preview; |
|
|
|
var fastMode = config.fastMode; |
|
|
|
var fastMode = config.fastMode; |
|
|
|
|
|
|
|
var forceUniformNewline = config.forceUniformNewline; |
|
|
|
var quoteChar; |
|
|
|
var quoteChar; |
|
|
|
/** Allows for no quoteChar by setting quoteChar to undefined in config */ |
|
|
|
/** Allows for no quoteChar by setting quoteChar to undefined in config */ |
|
|
|
if (config.quoteChar === undefined) { |
|
|
|
if (config.quoteChar === undefined) { |
|
|
@ -1438,6 +1439,9 @@ License: MIT |
|
|
|
if (typeof input !== 'string') |
|
|
|
if (typeof input !== 'string') |
|
|
|
throw new Error('Input must be a string'); |
|
|
|
throw new Error('Input must be a string'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (forceUniformNewline) |
|
|
|
|
|
|
|
input = input.replace(/(\r\n|\r|\n)/g, newline); |
|
|
|
|
|
|
|
|
|
|
|
// We don't need to compute some of these every time parse() is called,
|
|
|
|
// We don't need to compute some of these every time parse() is called,
|
|
|
|
// but having them in a more local scope seems to perform better
|
|
|
|
// but having them in a more local scope seems to perform better
|
|
|
|
var inputLen = input.length, |
|
|
|
var inputLen = input.length, |
|
|
|