DefinitelyTyped/through/through-tests.ts
2016-04-27 21:53:46 -07:00

11 lines
193 B
TypeScript

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