conclure-quarx
Advanced tools
Comparing version 0.5.0 to 0.5.1
{ | ||
"name": "conclure-quarx", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Reactive flows", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -134,1 +134,20 @@ import { createAtom, autorun, Quarx } from 'quarx'; | ||
} | ||
export function autorunFlow(computation, options = {}) { | ||
const { | ||
name = 'autorunFlow', | ||
} = options; | ||
let cancel; | ||
const stop = autorun(() => { | ||
if (cancel) cancel(); | ||
cancel = conclude(reactiveFlow(computation()), () => {}); | ||
}, { name }); | ||
return () => { | ||
if (cancel) cancel(); | ||
stop(); | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8385
241