0.0.3 • Published 9 years ago

aerostate v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
9 years ago

ES6 async fluent state machine

var data = {progress: []}
var state = new Aerostate('green')
  .always(() => console.log('always'))
  .when('green').perform(() => console.log('green')).then('yellow')
  .when('yellow').perform(() => console.log('yellow')).then('red')
  .when('red')
    .perform(
      () => console.log('red'), 
      (data, progress) => progress.resolve())
    .then('white')
  .run(data, data.progress)
  .then(data => console.log(data), error => console.log(error));
0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago