fromArray Rx wiki on github
coffee> rext = require \'rx\'
coffee> arr = [1..5]
In RxJS what you are looking for is called a Subject
.
You can push data into it and stream it from there.
Example:
var array = [];
var arraySubject = new Rx.Subject();
var pushToArray = function (item) {
array.push(item);
arraySubject.next(item);
}
// Subscribe to the subject to react to changes
arraySubject.subscribe((item) => console.log(item));