Socket
Socket
Sign inDemoInstall

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 0.1.3 to 0.1.4

22

lib/index.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.9.1
// Generated by CoffeeScript 1.9.3
var Parser, StringDecoder, stream, util;

@@ -44,3 +44,3 @@

parser = new Parser(options);
if (data) {
if (data != null) {
process.nextTick(function() {

@@ -80,3 +80,3 @@ parser.write(data);

Parser = function(options) {
var base, base1, base10, base11, base2, base3, base4, base5, base6, base7, base8, base9, k, v;
var base, base1, base10, base11, base12, base2, base3, base4, base5, base6, base7, base8, base9, k, v;
if (options == null) {

@@ -125,5 +125,8 @@ options = {};

}
if ((base11 = this.options).skip_empty_lines == null) {
base11.skip_empty_lines = false;
if ((base11 = this.options).auto_parse_date == null) {
base11.auto_parse_date = false;
}
if ((base12 = this.options).skip_empty_lines == null) {
base12.skip_empty_lines = false;
}
this.lines = 0;

@@ -208,3 +211,3 @@ this.count = 0;

Parser.prototype.__write = function(chars, end, callback) {
var acceptedLength, areNextCharsDelimiter, areNextCharsRowDelimiters, char, escapeIsQuote, i, isDelimiter, isEscape, isNextCharAComment, isQuote, isRowDelimiter, l, ltrim, nextCharPos, ref, results, rowDelimiter, rowDelimiterLength, rtrim, wasCommenting;
var acceptedLength, areNextCharsDelimiter, areNextCharsRowDelimiters, char, escapeIsQuote, i, isDelimiter, isEscape, isNextCharAComment, isQuote, isRowDelimiter, l, ltrim, m, nextCharPos, ref, results, rowDelimiter, rowDelimiterLength, rtrim, wasCommenting;
ltrim = this.options.trim || this.options.ltrim;

@@ -316,2 +319,9 @@ rtrim = this.options.trim || this.options.rtrim;

this.line.push(parseFloat(this.field));
} else if (this.options.auto_parse && this.options.auto_parse_date) {
m = Date.parse(this.field);
if (isNaN(m)) {
this.line.push(this.field);
} else {
this.line.push(new Date(m));
}
} else {

@@ -318,0 +328,0 @@ this.line.push(this.field);

{
"version": "0.1.3",
"version": "0.1.4",
"name": "csv-parse",
"description": "CSV parsing implementing the Node.js `stream.Transform` API",
"keywords": [ "csv", "parse", "parser" ],
"keywords": [
"csv",
"parse",
"parser"
],
"contributors": [

@@ -30,3 +34,4 @@ "David Worms <david@adaltas.com> (http://www.adaltas.com)",

"homepage": "http://csv.adaltas.com/parse/",
"dependencies": {},
"dependencies": {
},
"devDependencies": {

@@ -47,2 +52,2 @@ "each": "0.5.0",

}
}
}
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