Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

example

  • Loading branch information...
commit 0aa381feaceb566995442bff06c9806ddc619841 1 parent 33a2026
Dominic Tarr authored
Showing with 23 additions and 0 deletions.
  1. +23 −0 example.js
23 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())
+})
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.