UNPKG

taggedjs

Version:

tagged template reactive html

19 lines 942 B
import { getSupportWithState } from "../interpolations/attributes/getSupportWithState.function.js"; import { getSupportInCycle } from "../tag/getSupportInCycle.function.js"; import { ValueTypes } from "../tag/index.js"; import { processSubscribeWith } from "../tag/update/processSubscribe.function.js"; import { deleteAndUnsubscribe } from "../tag/update/setupSubscribe.function.js"; /** Have an html tagged value as value of subscribe emissions, with initial default value emission. Automatically unsubscribes for you */ export function subscribeWith(Observable, withDefault, callback) { return { tagJsType: ValueTypes.subscribe, processInit: processSubscribeWith, delete: deleteAndUnsubscribe, callback, withDefault, states: getSupportWithState(getSupportInCycle()).states, Observable, Observables: [Observable], }; } //# sourceMappingURL=subscribeWith.function.js.map