with-subscribe
Minimal Observable interface to watch for object modifications.
Installation
npm install --save with-subscribe
Usage
On a constructor:
{ thiscount = 0 } { thiscount += 1 }const CounterWithSubscribe = const counter = counter // -> State: 0 counter // -> State: 1counter // -> State: 2
As a decorator:
@withSubscribe { thiscount = 0 } { thiscount += 1 }const counter = counter // -> State: 0 counter // -> State: 1counter // -> State: 2
On an object:
const counter = counter // -> State: 0 counter // -> State: 1counter // -> State: 2
caiogondim.com · GitHub @caiogondim · Twitter @caio_gondim