Permalink
Browse files

example

  • Loading branch information...
1 parent 33a2026 commit 0aa381feaceb566995442bff06c9806ddc619841 @dominictarr committed Dec 7, 2012
Showing with 23 additions and 0 deletions.
  1. +23 −0 example.js
View
@@ -0,0 +1,23 @@
+
+var RArray = require('./')
+
+var a = new RArray()
+var b = new RArray()
+var s
+
+//pipe instances together...
+;(s = a.createStream())
+ .pipe(b.createStream())
+ .pipe(s)
+
+//see https://github.com/dominictarr/scuttlebutt
+
+b.splice(0, 0, 'A', 'B', 'C', 'D')
+a.push('zzzz')
+
+process.nextTick(function () {
+ console.log('A', b.toJSON())
+ console.log('B', b.toJSON())
+})
+
+

0 comments on commit 0aa381f

Please sign in to comment.