Note that this only works in Node 0.10 now, using the new Streams.
Drinks and vomits Stream contents. Promised to be really noisy.
As you could probably guess, this is totes influenced by the Clojure core library. But more general :D
var noisyo =var spit = noisyospitvar slurp = noisyoslurp// Slurp takes a Stream and returns a Promise of its contents.// Spit takes a Stream, and some contents, and returns a Promise of the// eventual draining.// So, why not just `.pipe()` you faggot?// Well, these work with both Strings and Streams interchangeably.var input =input// Obviously, you *will* want to use Streams directly if you're interested in// piping between them, this is not a substitute for Streams, just a nice,// high-level way of getting to its contents in one-shot quickly and// asynchronously. But it will buffer the whole thing in memory, which might be// *bad* in certain cases.
Just grab it from NPM:
$ npm install noisyo
A quick reference of the API can be built using Calliope:
$ npm install -g calliope $ calliope build
You can run all tests using Mocha:
$ npm test
MIT/X11. ie.: do whatever you want.