observ-default
v1.0.0
Published
Observ but with default value on null.
Downloads
9
Readme
observ-default
Observ but with default value on null.
Example
var ObservDefault = require('observ-default')
var obs = ObservDefault('default value')
obs() //=> 'default value'
obs.set('other value')
obs() //=> 'other value'
obs.set(null)
obs() //=> 'default value'