1.0.1 • Published 6 years ago

obento-state v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

obento-state

obent-state can manage internal state change like URL

Installation

Yarn:

yarn add obento-state

npm:

npm install --save obento-state

Example

var state = new require('obento-state')();

var fc = function() {
  state.wait();
  setTimeout(function() {
    state.notify();
  }, 1000);
}

state.listen('add:a', fc);
state.listen('add:b', function() {
  // will call after 1 second from called fc()
});

state.change('/a/b');

// will call 'fc'
1.0.1

6 years ago

1.0.0

6 years ago