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.md | changed |
README.md | ||
---|---|---|
@@ -68,10 +68,10 @@ | ||
68 | 68 | Unless, it is a call to abort the stream (`read(truthy, cb)`). |
69 | 69 | |
70 | 70 | ```js |
71 | 71 | //a stream of 100 random numbers. |
72 | -var i = 100 | |
73 | 72 | var random = function () { |
73 | + var i = 100 | |
74 | 74 | return function (end, cb) { |
75 | 75 | if(end) return cb(end) |
76 | 76 | //only read 100 times |
77 | 77 | if(i-- < 0) return cb(true) |
Built with git-ssb-web