Add production dependencies
This commit is contained in:
parent
5a0114f3e2
commit
579ccdc29f
12113 changed files with 978046 additions and 3 deletions
16
node_modules/fork-stream/example.js
generated
vendored
Normal file
16
node_modules/fork-stream/example.js
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
var ForkStream = require("./");
|
||||
|
||||
var fork = new ForkStream({
|
||||
classifier: function classify(e, done) {
|
||||
return done(null, e >= 5);
|
||||
},
|
||||
});
|
||||
|
||||
fork.a.on("data", console.log.bind(null, "a"));
|
||||
fork.b.on("data", console.log.bind(null, "b"));
|
||||
|
||||
for (var i=0;i<20;++i) {
|
||||
fork.write(Math.round(Math.random() * 10));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue