Wait for your last event to play
Last will wait until your stream ends, and play the very last event that has occurred.
Warning: v2.x is only compatible with @most/core. For the old mostjs, use most-last
v1.0.
npm install --save most-last
import { iterate, take } from 'most'
import { last } from 'most-last'
const stream = last(take(5, iterate(x => x + 1, 0)))
stream.observe(function (x) {
if (x === 4) { // true
...
}
})