Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

csv-parse

Package Overview
Dependencies
Maintainers
1
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv-parse - npm Package Compare versions

Comparing version 4.4.5 to 4.4.6

4

CHANGELOG.md

@@ -10,2 +10,6 @@

## Version 4.4.6
* security: remove regexp vulnerable to DOS in cast option, npm report 69742
## Version 4.4.5

@@ -12,0 +16,0 @@

17

lib/es5/index.js

@@ -988,5 +988,3 @@ "use strict";

if (this.__isInt(field) === true) {
return [undefined, parseInt(field)];
} else if (this.__isFloat(field)) {
if (this.__isFloat(field)) {
return [undefined, parseFloat(field)];

@@ -998,9 +996,10 @@ } else if (this.options.cast_date !== false) {

return [undefined, field];
}
} // Keep it in case we implement the `cast_int` option
// __isInt(value){
// // return Number.isInteger(parseInt(value))
// // return !isNaN( parseInt( obj ) );
// return /^(\-|\+)?[1-9][0-9]*$/.test(value)
// }
}, {
key: "__isInt",
value: function __isInt(value) {
return /^(\-|\+)?([1-9]+[0-9]*)$/.test(value);
}
}, {
key: "__isFloat",

@@ -1007,0 +1006,0 @@ value: function __isFloat(value) {

@@ -750,5 +750,3 @@

}
if(this.__isInt(field) === true){
return [undefined, parseInt(field)]
}else if(this.__isFloat(field)){
if(this.__isFloat(field)){
return [undefined, parseFloat(field)]

@@ -760,5 +758,8 @@ }else if(this.options.cast_date !== false){

}
__isInt(value){
return /^(\-|\+)?([1-9]+[0-9]*)$/.test(value)
}
// Keep it in case we implement the `cast_int` option
// __isInt(value){
// // return Number.isInteger(parseInt(value))
// // return !isNaN( parseInt( obj ) );
// return /^(\-|\+)?[1-9][0-9]*$/.test(value)
// }
__isFloat(value){

@@ -765,0 +766,0 @@ return (value - parseFloat( value ) + 1) >= 0 // Borrowed from jquery

{
"version": "4.4.5",
"version": "4.4.6",
"name": "csv-parse",

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc