UNPKG

mutant

Version:

Create observables and map them to DOM elements. Massively inspired by hyperscript and observ-*. No virtual dom, just direct observable bindings. Unnecessary garbage collection is avoided by using mutable objects instead of blasting immutable junk all ove

11 lines (9 loc) 196 B
var Proxy = require('./proxy') var onceIdle = require('./once-idle') module.exports = function IdleProxy (fn) { var obs = Proxy() onceIdle(function () { obs.set(fn()) }) return obs }