o_0
npm i o_0

o_0

Fresh and intellegent observables

by distri

0.4.0-pre.0 (see all)License:MITTypeScript:Not Found
npm i o_0
Readme

Build Status

Observable

Installation

Node

npm install o_0

Usage

Observable = require "o_0"

Get notified when the value changes.

observable = Observable 5

observable() # 5

observable.observe (newValue) ->
  console.log newValue

observable 10 # logs 10 to console

Arrays

Proxy array methods.

observable = Observable [1, 2, 3]

observable.forEach (value) ->
  # 1, 2, 3

Functions

Automagically compute dependencies for observable functions.

firstName = Observable "Duder"
lastName = Observable "Man"

o = Observable ->
  "#{firstName()} #{lastName()}"

o.observe (newValue) ->
  assert.equal newValue, "Duder Bro"

lastName "Bro"

Downloads/wk

62

GitHub Stars

21

LAST COMMIT

NaNyrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

0

OPEN PRs

1
VersionTagPublished
0.4.0-pre.0
latest
5yrs ago
No alternatives found
No tutorials found
Add a tutorial