1.4.1 • Published 9 years ago
@most/hold v1.4.1
@most hold()
Deliver the most recently seen event to each new observer the instant it begins observing. A held stream is always multicast.
Note: @most/hold >= 3.0.0 is compatible with @most/core. Use @most/hold 2.x for compatibility with most 1.x.
Install
npm install --save @most/hold
Usage
import { click } from '@most/dom-event'
import { map } from '@most/core'
import { hold } from '@most/hold'
const clickCoords = map(e => ({ x: e.clientX, y: clientY }), click(document))
// start holding on first subscription
const heldCoords = hold(clickCoords)API
hold :: Stream a → Stream a
Given an input stream:
stream: -a---b---c---d->observers which begin observing at different times will see:
observer1: -a---b---c---d->
observer2: a-b---c---d->
observer3: c--d->4.1.0
7 years ago
4.0.1
7 years ago
4.0.0
7 years ago
3.0.1
7 years ago
3.0.0
8 years ago
2.0.0
9 years ago
1.4.3
9 years ago
1.4.2
9 years ago
1.4.1
9 years ago
1.4.0
9 years ago
1.3.1
9 years ago
1.3.0
10 years ago
1.2.0
10 years ago
1.1.1
10 years ago
1.1.0
10 years ago
1.0.0
10 years ago
0.2.0
10 years ago
0.1.1
10 years ago
0.1.0
10 years ago