Skip to content

Commit

Permalink
Merge pull request #114 from eddiezane/patch-1
Browse files Browse the repository at this point in the history
Fix example code in README.md
  • Loading branch information
ifandelse committed May 4, 2016
2 parents b02af60 + d0f633d commit c983473
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ var vehicleSignal = new machina.Fsm( {
this.timer = setTimeout( function() {
this.handle( "timeout" );
}.bind( this ), 30000 );
this.emit( "vehicles", { status: GREEN } );
this.emit( "vehicles", { status: "GREEN" } );
},
// If all you need to do is transition to a new state
// inside an input handler, you can provide the string
Expand All @@ -109,7 +109,7 @@ var vehicleSignal = new machina.Fsm( {
}.bind( this ), 5000 );
// machina FSMs are event emitters. Here we're
// emitting a custom event and data, etc.
this.emit( "vehicles", { status: YELLOW } );
this.emit( "vehicles", { status: "YELLOW" } );
},
timeout: "red",
_onExit: function() {
Expand All @@ -121,7 +121,7 @@ var vehicleSignal = new machina.Fsm( {
this.timer = setTimeout( function() {
this.handle( "timeout" );
}.bind( this ), 1000 );
this.emit( "vehicles", { status: RED } );
this.emit( "vehicles", { status: "RED" } );
},
_reset: "green",
_onExit: function() {
Expand Down

0 comments on commit c983473

Please sign in to comment.