git ssb

2+

Dominic / pull-stream



Commit 6dab0f0aee56ec3a23287a6df1a8be33b0bef4ca

Merge pull request #55 from nrn/master

Update random number stream example.
Dominic Tarr authored on 6/22/2016, 11:50:25 PM
GitHub committed on 6/22/2016, 11:50:25 PM
Parent: 3761392134a6c580635137cb17b6e3d109e0eac5
Parent: 4c7ae55ea2df8d52977d122b65825b9350020303

Files changed

README.mdchanged
README.mdView
@@ -68,10 +68,10 @@
6868 Unless, it is a call to abort the stream (`read(truthy, cb)`).
6969
7070 ```js
7171 //a stream of 100 random numbers.
72-var i = 100
7372 var random = function () {
73+ var i = 100
7474 return function (end, cb) {
7575 if(end) return cb(end)
7676 //only read 100 times
7777 if(i-- < 0) return cb(true)

Built with git-ssb-web