Permalink
Browse files

make example runnable

  • Loading branch information...
1 parent 73ffec2 commit 8e22d756b3d2bd34593c00bfa5ec6c1287064b13 @dominictarr committed Apr 16, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 readme.md
View
@@ -17,13 +17,18 @@ currently it is uses the [plates](https://github.com/flatiron/plates) templating
var readStream = new stream.Stream()
readStream.readable = true
readStream.pipe(list)
-
+ readStream.write = function (data) {
+ this.emit('data', data); return true
+ }
+ readStream.end = function (data) {
+ this.emit('end')
+ }
// adds <div id="number">1</div>,
// <div id="number">2</div>
// and <div id="number">2</div>
/ to <div class="list"></div>
- readStream.emit({number: 1})
- readStream.emit({number: 2})
- readStream.emit({number: 3})
+ readStream.write({number: 1})
+ readStream.write({number: 2})
+ readStream.write({number: 3})
MIT LICENSE

0 comments on commit 8e22d75

Please sign in to comment.