Skip to content

Instantly share code, notes, and snippets.

@pyykkis
Created March 11, 2013 21:34
Show Gist options
  • Save pyykkis/5137985 to your computer and use it in GitHub Desktop.
Save pyykkis/5137985 to your computer and use it in GitHub Desktop.
String -> Stream -> String
var assert = require('assert'),
StringStream = require('../index'),
data = "Hello World!",
src = new StringStream(data),
dest = new StringStream();
src.pipe(dest);
dest.on('finish', function() {
assert.equal(src.data, '');
assert.equal(dest.data, data);
done();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment