1.0.0-alpha.8 • Published 6 years ago
@profiscience/knockout-contrib-observable-fn-subscribe-once v1.0.0-alpha.8
@profiscience/knockout-contrib-observable-fn-subscribe-once
NOTE: It is recommended to use the @profiscience/knockout-contrib-observable-fn metapackage
Creates a subscription that is called once and then disposed.
Usage
observable.fn.subscribeOnce(fn: (newValue: T) => void)
import '@profiscience/knockout-contrib-observable-fn/subscribeOnce'
const foo = ko.observable(0)
foo.subscribeOnce(() => console.log('hit!'))
foo(1)
// hit!
foo(2)
// nothing...
1.0.0-alpha.8
6 years ago
1.0.0-alpha.7
6 years ago
1.0.0-alpha.6
6 years ago
1.0.0-alpha.5
6 years ago
1.0.0-alpha.4
6 years ago
1.0.0-alpha.3
6 years ago
1.0.0-alpha.2
6 years ago
1.0.0-alpha.1
6 years ago
1.0.0-alpha.0
7 years ago