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

10 lines (8 loc) 298 B
var Struct = require('../struct') var isObservable = require('../is-observable') module.exports = function MutantKeyValue (key, value) { var result = Struct({key: key, value: value}) result._type = 'MutantKeyValue' result.isBound = isObservable(key) || isObservable(value) return result }