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

csv-parser

Package Overview
Dependencies
Maintainers
2
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 1.4.3 to 1.4.4

2

bench.js

@@ -7,3 +7,3 @@ var fs = require('fs');

fs.createReadStream('/tmp/tmp.csv')
fs.createReadStream(process.argv[2] || '/tmp/tmp.csv')
.pipe(csv())

@@ -10,0 +10,0 @@ .on('data', function(line) {

var stream = require('stream')
var inherits = require('inherits')
var gen = require('generate-object-property')
var genobj = require('generate-object-property')
var genfun = require('generate-function')

@@ -116,8 +117,13 @@ var quote = new Buffer('"')[0]

var props = this.headers.map(function(cell, i) {
return '\t'+gen('this', cell)+' = cells['+i+']'
}).join('\n')+'\n'
var Row = genfun()
('function Row(cells) {')
this._Row = new Function('return function Row(cells) {\n'+props+'}')()
this.headers.forEach(function(cell, i) {
Row('%s = cells[%d]', genobj('this', cell), i)
})
Row('}')
this._Row = Row.toFunction()
if (Object.defineProperty) {

@@ -124,0 +130,0 @@ Object.defineProperty(this._Row.prototype, 'headers', {

{
"name": "csv-parser",
"version": "1.4.3",
"version": "1.4.4",
"description": "Streaming csv parser inspired by binary-csv that aims to be faster than everyone else",
"repository": "mafintosh/csv-parser",
"dependencies": {
"generate-function": "^1.0.1",
"generate-object-property": "^1.0.0",
"inherits": "^2.0.1",
"ldjson-stream": "^1.1.0",
"minimist": "^0.2.0",
"inherits": "^2.0.1"
"minimist": "^0.2.0"
},

@@ -12,0 +13,0 @@ "devDependencies": {

# csv-parser
Streaming csv parser inspired by binary-csv that aims to be faster than everyone else
Streaming csv parser inspired by binary-csv that aims to be faster than everyone else.

@@ -12,2 +12,4 @@ ```

`csv-parser` can convert CSV into JSON at at rate of around 90,000 rows per second (perf varies with data, try `bench.js` with your data).
## Usage

@@ -17,2 +19,4 @@

You can use `csv-parser` in the browser with [browserify](http://browserify.org/)
``` js

@@ -19,0 +23,0 @@ var csv = require('csv-parser')

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