Hello hello lovely Node-js people- I'm trying to implement a very simple stream.Transform, but I appear to be doing something wrong! Please help me figure out how to get going with stream.Transform!
My utterly trivial sample code is at- https://github.com/rektide/arclamp2/blob/nop/src/ClarinetStream.js It's essentially- function clarinetStream(){return this} util.inherit(clarinetStream, stream.Transform) clarinetStream.prototype._transform= function(chunk,outFn,callback){callback()} When I try to run my sample (which can be done via `npm test`), I get this stack trace- _stream_writable.js:129 if (state.ended) { ^ TypeError: Cannot read property 'ended' of undefined at ClarinetStream.Writable.write (_stream_writable.js:129:12) at write (_stream_readable.js:481:24) at flow (_stream_readable.js:491:7) at ReadStream.pipeOnReadable (_stream_readable.js:523:5) at ReadStream.EventEmitter.emit (events.js:91:17) at emitReadable (_stream_readable.js:343:10) at onread (_stream_readable.js:288:7) at ReadableState.onread (_stream_readable.js:64:5) at onread (fs.js:1509:5) at Object.wrapper [as oncomplete] (fs.js:419:17) I had been attempting to use a 0.9.9-pre vintage build, and am now locked & loaded with the latest trunk work. I've looked around some of Node's lib/_stream_* impl, but thusfar I don't have a good registration on what's going on, what I could be doing wrong. Any help getting a sample stream.Transform running would be much appreciated!! -rektide de la faye -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
