adaltas / node-stream-transform

Object transformations implementing the Node.js `stream.Transform` API
https://csv.js.org/transform/
49 stars 13 forks source link

0.0.9 callback approach is broken. #12

Closed jf-lavoie closed 9 years ago

jf-lavoie commented 9 years ago

Repro steps:

&> npm install stream-transform@0.0.9
&> node
> var transform = require('stream-transform'); 
transform([ ['test'] ], function(record) { return 1; }, function(err, values) { console.log("values: ", values);});
[ printed return values skipped for clarity ]
>

The callback never gets called.

Expected:

values: [ '1' ]

Digging in the npm 0.0.9 package, I discovered this code:

callback = function() {};
  if (callback) {

lib/index.js ln 58,59

I don't know if it is debug code or related to a coffee script compilation problem.

The workaround was to reinstall stream-transform 0.0.8

Merci!

jf-lavoie commented 9 years ago

Hi,

I notice you fixed the issue in 0.1.0. Thank you.

I was wondering if you had plans to update library node-csv dependency of stream-transform to version 0.1.0 also?

Thank you.

wdavidw commented 9 years ago

done, sorry for the inconveniency