DefinitelyTyped/through/through-tests.ts
2013-08-15 21:41:33 -05:00

9 lines
199 B
TypeScript

import through = require('through');
var i = 0;
through(
function () {
this.queue((i++).toString());
}, function () {
this.queue(null);
}, { autoDestroy: true }).pipe(process.stdout);