Socket
Socket
Sign inDemoInstall

csv-parser

Package Overview
Dependencies
Maintainers
3
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv-parser - npm Package Compare versions

Comparing version 2.3.2 to 2.3.3

16

index.js
const { Transform } = require('stream')
const bufferFrom = require('buffer-from')
const bufferAlloc = require('buffer-alloc')
const [cr] = bufferFrom('\r')
const [nl] = bufferFrom('\n')
const [cr] = Buffer.from('\r')
const [nl] = Buffer.from('\n')
const defaults = {

@@ -34,3 +32,3 @@ escape: '"',

if (typeof options[key] !== 'undefined') {
([options[key]] = bufferFrom(options[key]))
([options[key]] = Buffer.from(options[key]))
}

@@ -40,6 +38,6 @@ }

// if escape is not defined on the passed options, use the end value of quote
options.escape = (opts || {}).escape ? bufferFrom(options.escape)[0] : options.quote
options.escape = (opts || {}).escape ? Buffer.from(options.escape)[0] : options.quote
this.state = {
empty: options.raw ? bufferAlloc(0) : '',
empty: options.raw ? Buffer.alloc(0) : '',
escaped: false,

@@ -108,3 +106,3 @@ first: true,

const char = typeof skipComments === 'string' ? skipComments : '#'
if (buffer[start] === bufferFrom(char)[0]) {
if (buffer[start] === Buffer.from(char)[0]) {
return

@@ -207,3 +205,3 @@ }

if (typeof data === 'string') {
data = bufferFrom(data)
data = Buffer.from(data)
}

@@ -210,0 +208,0 @@

{
"name": "csv-parser",
"version": "2.3.2",
"version": "2.3.3",
"description": "Streaming CSV parser that aims for maximum speed as well as compatibility with the csv-spectrum test suite",

@@ -35,8 +35,4 @@ "license": "MIT",

"dependencies": {
"@hapi/joi": "^16.1.4",
"buffer-alloc": "^1.1.0",
"buffer-from": "^1.0.0",
"generate-object-property": "^1.0.0",
"minimist": "^1.2.0",
"ndjson": "^1.4.0"
"through2": "^3.0.1"
},

@@ -43,0 +39,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

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