observ-default

1.0.0 • Public • Published

observ-default

Observ but with default value on null.

NPM

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'

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.02latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.02

Package Sidebar

Install

npm i observ-default

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • mmckegg