Socket
Socket
Sign inDemoInstall

csv

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

LICENSE

2

doc/from.md

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

title: "Reading data from a source"
date: 2012-11-05T20:57:04.723Z
date: 2012-11-16T16:44:20.770Z
comments: false

@@ -8,0 +8,0 @@ sharing: false

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

title: "Node CSV"
date: 2012-11-05T20:57:04.723Z
date: 2012-11-16T16:44:20.770Z
comments: false

@@ -18,3 +18,3 @@ sharing: false

* Follow the NodeJs streaming API
* Follow the Node.js streaming API
* Async and event based

@@ -32,2 +32,9 @@ * Support delimiters, quotes and escape characters

Installation
------------
```bash
npm install csv
```
Quick example

@@ -34,0 +41,0 @@ -------------

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

title: "Parsing"
date: 2012-11-05T20:57:04.724Z
date: 2012-11-16T16:44:20.771Z
comments: false

@@ -8,0 +8,0 @@ sharing: false

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

title: "Stringifier"
date: 2012-11-05T20:57:04.724Z
date: 2012-11-16T16:44:20.771Z
comments: false

@@ -8,0 +8,0 @@ sharing: false

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

title: "Writing data to a destination"
date: 2012-11-05T20:57:04.724Z
date: 2012-11-16T16:44:20.771Z
comments: false

@@ -77,6 +77,9 @@ sharing: false

`transform()`.
* `end` Prevent calling `end` on the destination, so that destination is no longer writable, similar to passing `{end: false}` option in <a name="stream.pipe"></a>
`stream.pipe()`.
* `end` Prevent calling `end` on the destination, so that destination is no longer writable.
The end options is similar to passing `{end: false}` option in <a name="stream.pipe"></a>
`stream.pipe()`. According to the Node.js documentation:
> By default end() is called on the destination when the source stream emits end, so that destination is no longer writable. Pass { end: false } as options to keep the destination stream open.
<a name="to.string"></a>

@@ -83,0 +86,0 @@ `to.string(callback, [options])`

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

title: "Transforming data"
date: 2012-11-05T20:57:04.724Z
date: 2012-11-16T16:44:20.771Z
comments: false

@@ -8,0 +8,0 @@ sharing: false

@@ -10,3 +10,3 @@ // Generated by CoffeeScript 1.3.3

* Follow the NodeJs streaming API
* Follow the Node.js streaming API
* Async and event based

@@ -24,2 +24,9 @@ * Support delimiters, quotes and escape characters

Installation
------------
```bash
npm install csv
```
Quick example

@@ -26,0 +33,0 @@ -------------

@@ -16,4 +16,4 @@ // Generated by CoffeeScript 1.3.3

Note, it is quite simple at the moment, more functionnalities could come later. The code
originates from "./samples/perf.coffee" and was later extracted in case other need its
functionnalities.
originates from "./samples/perf.coffee" and was later extracted in case other persons need
its functionnalities.

@@ -20,0 +20,0 @@ Options may include

@@ -99,3 +99,6 @@ // Generated by CoffeeScript 1.3.3

* `newColumns` If the `columns` option is not specified (which means columns will be taken from the reader options, will automatically append new columns if they are added during `transform()`.
* `end` Prevent calling `end` on the destination, so that destination is no longer writable, similar to passing `{end: false}` option in `stream.pipe()`.
* `end` Prevent calling `end` on the destination, so that destination is no longer writable.
The end options is similar to passing `{end: false}` option in `stream.pipe()`. According to the Node.js documentation:
> By default end() is called on the destination when the source stream emits end, so that destination is no longer writable. Pass { end: false } as options to keep the destination stream open.
*/

@@ -170,3 +173,3 @@

}
csv.pipe(stream);
csv.pipe(stream, csv.options.to);
stream.on('error', function(e) {

@@ -173,0 +176,0 @@ return csv.error(e);

{
"name": "csv",
"version": "0.2.2",
"version": "0.2.3",
"description": "CSV parser with simple api, full of options and tested against large datasets.",
"homepage": "http://www.adaltas.com/projects/node-csv/",
"author": "David Worms <david@adaltas.com>",

@@ -45,4 +46,3 @@ "contributors": [

"test": "make test"
},
"homepage": "https://github.com/wdavidw/node-csv-parser"
}
}
// CSV sample - Copyright David Worms <open@adaltas.com> (BSD Licensed)
// node samples/column.js
var csv = require('..');

@@ -6,0 +3,0 @@

@@ -1,4 +0,1 @@

// CSV sample - Copyright jon seymour jon.seymour@gmail.com
// node samples/duplicate-headers.js < samples/duplicate-headers.in
//

@@ -39,3 +36,3 @@ // This sample shows how the write function can be used

`node samples/duplicate-header.js`
`node samples/duplicate-headers.js < samples/duplicate-headers.in`

@@ -42,0 +39,0 @@ ts,year,ms,chars,age,date

// CSV sample - Copyright David Worms <open@adaltas.com> (BSD Licensed)
// node samples/column.js
var csv = require('..');

@@ -12,4 +9,3 @@

.to.stream(process.stdout, {
newColumns: true,
end: false
newColumns: true
})

@@ -19,2 +15,5 @@ .transform(function(data){

return data;
})
.on('end', function(){
process.stdout.write('\n');
});

@@ -21,0 +20,0 @@

// CSV sample - Copyright David Worms <open@adaltas.com> (BSD Licensed)
var csv = require('..');

@@ -18,3 +16,3 @@

})
.on('end',function(count){
.on('close',function(count){
console.log('Number of lines: '+count);

@@ -21,0 +19,0 @@ })

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

var csv = require('..');

@@ -8,5 +9,8 @@

// Note, in the latest version of Node.js, the pipe
// method detect `process.stdout` and wont try to close it.
csv()
.from.array(data)
.to.stream(process.stdout, {end: false}); //thows on csv.js line 150
.to.stream(process.stdout, {end: false});

@@ -13,0 +17,0 @@ /*

// CSV sample - Copyright David Worms <open@adaltas.com> (BSD Licensed)
var csv = require('..');

@@ -5,0 +3,0 @@

// CSV sample - Copyright David Worms <open@adaltas.com> (BSD Licensed)
// node samples/transform.js
var csv = require('..');

@@ -6,0 +3,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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