oh that can be done like this to
function UpperTransform() {
var toUpper = stream.Transform();
toUpper._transform = function (chunk, encoding, done) {
this.push(chunk.toString().toUpperCase());
done();
}
return toUpper;
}
On Friday, 16 January 2015 17:21:51 UTC+1, Roelof Wobben wrote:
>
> Hello,
>
> As a solution I made this :
>
> ~~~
>
> var through = require('through');
> var tr = through(function write(data) {
> this.queue(data.toString().toUpperCase())
> },
> function end () {
> this.queue(null)
> });
> process.stdin.pipe(tr).pipe(process.stdout);
>
> ~~~
>
> Now I have read that in node 0.10 there is a transform class who can do
> the same.
>
> Does anyone have a tip if this can be done and how I can do this ?
>
> Roelof
>
>
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/93e63bdc-e28b-43ae-b534-bf77d871cc9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.