3 module.exports = factory
5 // Construct a state `toggler`: a function which inverses `property` in context
6 // based on its current value.
7 // The by `toggler` returned function restores that value.
8 function factory(key, state, ctx) {
12 var context = ctx || this
13 var current = context[key]
20 context[key] = current