npm.io
1.0.0 • Published 11 years ago

observ-value

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
Stars
3

observ-value Build Status

Get the value of an observable via a single interface

Install

$ npm install --save observ-value

Usage

observ-value is designed to let you easily write functions that can take both observables themselves as well as the copies they return/emit.

var value = require('observ-value')
var Observ = require('observ')

var name = Observ('Ben')

value(name)
//=> Ben

value(name())
//=> Ben

API

value(input) -> any
input

Required
Type: any

Either an observable or a copy emitted by the observable.

License

MIT Ben Drucker

Keywords