Created
June 8, 2016 19:16
-
-
Save randallb/5207292481b6098a2fc12aa0f87a8011 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bad i think? | |
function currentUserStream () { | |
return Rx.Observable.create((o) => { | |
const fn = () => { | |
o.next(Math.random()); | |
}; | |
setInterval(fn, 250); | |
}).take(11).share(); | |
} | |
module.exports = { | |
currentUserStream: currentUserStream(), | |
}; | |
//good i think? | |
function currentUserStream () { | |
return Rx.Observable.create((o) => { | |
const fn = () => { | |
o.next(Math.random()); | |
}; | |
setInterval(fn, 500); | |
}).take(11); | |
} | |
module.exports = { | |
currentUserStream, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment