UNPKG

@fbltd/async

Version:

Miscellaneous async utils

15 lines (14 loc) 409 B
import { Dependency } from "./dependency.js"; import { reaction } from "./vanilla/index.js"; import { getStream } from "./vanilla/get.stream.js"; export class DepFactory { static ofValue(value, config) { return new Dependency(value, config); } static ofReaction(fn, config) { return reaction(fn, config); } static ofDependency(dep) { return getStream(dep); } }