Comparing version 1.0.0 to 1.0.1
@@ -26,7 +26,2 @@ 'use strict'; | ||
this.loadHandles(); | ||
for (var state in this.layers) { | ||
var layer = this.layers[state]; | ||
layer.handleInit(app.addJob.bind(app)); | ||
} | ||
}; | ||
@@ -38,3 +33,3 @@ | ||
app.addJob = function(job) { | ||
app.dispatch = function(job) { | ||
var app = this; | ||
@@ -58,6 +53,2 @@ | ||
app.removeJob = function() { | ||
}; | ||
app.loadHandles = function() { | ||
@@ -64,0 +55,0 @@ var fsmPath = util.getHandlePath(this.base, this.name); |
@@ -12,3 +12,2 @@ 'use strict'; | ||
this.initHandle = stateHandle.init; | ||
this.entryHandle = stateHandle.entry; | ||
@@ -18,8 +17,2 @@ this.exitHandle = stateHandle.exit; | ||
Layer.prototype.handleInit = function(start) { | ||
if (this.initHandle) { | ||
this.initHandle(start); | ||
} | ||
}; | ||
Layer.prototype.handleEntry = function(job, next) { | ||
@@ -26,0 +19,0 @@ if (this.entryHandle) { |
{ | ||
"name": "mdw-fsm", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "middleware finite state machine", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
'use strict'; | ||
// var path = require('path'); | ||
var fsmFactory = require('../index'); | ||
var Job = require('../index').Job; | ||
@@ -18,1 +18,4 @@ var opts = { | ||
trafficLight.start(); | ||
var job = Job.create('green'); | ||
trafficLight.dispatch(job); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10883
368