Socket
Socket
Sign inDemoInstall

csv-parse

Package Overview
Dependencies
0
Maintainers
1
Versions
141
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.16.0 to 4.16.2

4

lib/es5/index.d.ts

@@ -232,2 +232,6 @@ // Original definitions in https://github.com/DefinitelyTyped/DefinitelyTyped by: David Muller <https://github.com/davidm77>

/**
* Count of the number of processed bytes.
*/
readonly bytes: number;
/**
* Number of non uniform records when `relax_column_count` is true.

@@ -234,0 +238,0 @@ */

24

lib/es5/index.js

@@ -15,3 +15,3 @@ "use strict";

function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

@@ -26,3 +26,3 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

@@ -33,3 +33,3 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

@@ -56,3 +56,3 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

@@ -502,2 +502,3 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

this.info = {
bytes: 0,
comment_lines: 0,

@@ -512,2 +513,3 @@ empty_lines: 0,

bomSkipped: false,
bufBytesStart: 0,
castField: fnCastField,

@@ -628,3 +630,5 @@ commenting: false,

// Skip BOM
buf = buf.slice(boms[encoding].length); // Renormalize original options with the new encoding
var bomLength = boms[encoding].length;
this.state.bufBytesStart += bomLength;
buf = buf.slice(bomLength); // Renormalize original options with the new encoding

@@ -784,5 +788,8 @@ this.__normalizeOptions(_objectSpread(_objectSpread({}, this.__originalOptions), {}, {

this.info.bytes = this.state.bufBytesStart + pos;
var errField = this.__onField();
if (errField !== undefined) return errField;
this.info.bytes = this.state.bufBytesStart + pos + recordDelimiterLength;

@@ -819,2 +826,4 @@ var errRecord = this.__onRecord();

if (delimiterLength !== 0) {
this.info.bytes = this.state.bufBytesStart + pos;
var _errField = this.__onField();

@@ -859,2 +868,4 @@

if (this.state.wasQuoting === true || this.state.record.length !== 0 || this.state.field.length !== 0) {
this.info.bytes = this.state.bufBytesStart + pos;
var _errField2 = this.__onField();

@@ -874,2 +885,3 @@

} else {
this.state.bufBytesStart += pos;
this.state.previousBuf = buf.slice(pos);

@@ -1402,3 +1414,3 @@ }

} else {
throw new CsvError('CSV_INVALID_ARGUMENT', ['Invalid argument:', "got ".concat(JSON.stringify(argument), " at index ").concat(i)], this.options);
throw new CsvError('CSV_INVALID_ARGUMENT', ['Invalid argument:', "got ".concat(JSON.stringify(argument), " at index ").concat(i)], options || {});
}

@@ -1405,0 +1417,0 @@ }

@@ -232,2 +232,6 @@ // Original definitions in https://github.com/DefinitelyTyped/DefinitelyTyped by: David Muller <https://github.com/davidm77>

/**
* Count of the number of processed bytes.
*/
readonly bytes: number;
/**
* Number of non uniform records when `relax_column_count` is true.

@@ -234,0 +238,0 @@ */

@@ -425,2 +425,3 @@

this.info = {
bytes: 0,
comment_lines: 0,

@@ -435,2 +436,3 @@ empty_lines: 0,

bomSkipped: false,
bufBytesStart: 0,
castField: fnCastField,

@@ -522,3 +524,5 @@ commenting: false,

// Skip BOM
buf = buf.slice(boms[encoding].length)
let bomLength = boms[encoding].length
this.state.bufBytesStart += bomLength
buf = buf.slice(bomLength)
// Renormalize original options with the new encoding

@@ -663,4 +667,6 @@ this.__normalizeOptions({...this.__originalOptions, encoding: encoding})

}
this.info.bytes = this.state.bufBytesStart + pos;
const errField = this.__onField()
if(errField !== undefined) return errField
this.info.bytes = this.state.bufBytesStart + pos + recordDelimiterLength;
const errRecord = this.__onRecord()

@@ -688,2 +694,3 @@ if(errRecord !== undefined) return errRecord

if(delimiterLength !== 0){
this.info.bytes = this.state.bufBytesStart + pos;
const errField = this.__onField()

@@ -738,2 +745,3 @@ if(errField !== undefined) return errField

if(this.state.wasQuoting === true || this.state.record.length !== 0 || this.state.field.length !== 0){
this.info.bytes = this.state.bufBytesStart + pos;
const errField = this.__onField()

@@ -750,2 +758,3 @@ if(errField !== undefined) return errField

}else{
this.state.bufBytesStart += pos
this.state.previousBuf = buf.slice(pos)

@@ -1165,3 +1174,3 @@ }

`got ${JSON.stringify(argument)} at index ${i}`
], this.options)
], options || {})
}

@@ -1168,0 +1177,0 @@ }

{
"version": "4.16.0",
"version": "4.16.2",
"name": "csv-parse",

@@ -60,3 +60,3 @@ "description": "CSV parsing implementing the Node.js `stream.Transform` API",

"coffeescript": "^2.5.1",
"csv-generate": "^3.2.4",
"csv-generate": "^3.4.2",
"csv-spectrum": "^1.0.0",

@@ -69,3 +69,3 @@ "each": "^1.2.2",

"should": "^13.2.3",
"stream-transform": "^2.0.2",
"stream-transform": "^2.1.2",
"ts-node": "^9.0.0",

@@ -94,8 +94,3 @@ "typescript": "^4.0.5"

"build": "npm run build:babel && npm run build:browserify",
"preversion": "grep '## Trunk' CHANGELOG.md && npm test && cp lib/*.ts lib/es5 && git add lib/es5/*.ts",
"version": "version=`grep '^ \"version\": ' package.json | sed 's/.*\"\\([0-9\\.]*\\)\".*/\\1/'` && sed -i \"s/## Trunk/## Version $version/\" CHANGELOG.md && git add CHANGELOG.md",
"postversion": "git push && git push --tags && npm publish",
"patch": "npm version patch -m 'Bump to version %s'",
"minor": "npm version minor -m 'Bump to version %s'",
"major": "npm version major -m 'Bump to version %s'",
"preversion": "cp lib/*.ts lib/es5 && git add lib/es5/*.ts",
"pretest": "npm run build",

@@ -105,3 +100,4 @@ "lint": "eslint lib/*.js",

},
"types": "./lib/index.d.ts"
"types": "./lib/index.d.ts",
"gitHead": "6b34c28a523bb4c666a5e8a7738640b71edf7b05"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc