@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...