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

12 lines (9 loc) 225 B
var resolve = require('./resolve') module.exports = function forEach (sources, fn) { if (sources && !sources.forEach) { sources = resolve(sources) } if (sources && sources.forEach) { sources.forEach(fn) } }