mooremachine
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -8,3 +8,3 @@ /* | ||
/* | ||
* Copyright (c) 2016, Joyent, Inc. | ||
* Copyright (c) 2018, Joyent, Inc. | ||
*/ | ||
@@ -62,2 +62,3 @@ | ||
FSMStateHandle.prototype.gotoState = function (state) { | ||
mod_assert.string(state, 'state'); | ||
if (!this.fsh_valid) { | ||
@@ -122,2 +123,5 @@ throw (new Error('FSM attempted to leave state ' + | ||
FSMStateHandle.prototype.on = function (obj, evt, cb) { | ||
mod_assert.object(obj, 'obj'); | ||
mod_assert.string(evt, 'evt'); | ||
mod_assert.func(cb, 'cb'); | ||
if (!this.fsh_valid) { | ||
@@ -133,2 +137,4 @@ throw (new Error('FSM attempted to set up handler in state ' + | ||
FSMStateHandle.prototype.interval = function (interval, cb) { | ||
mod_assert.number(interval, 'interval'); | ||
mod_assert.func(cb, 'cb'); | ||
if (!this.fsh_valid) { | ||
@@ -145,2 +151,4 @@ throw (new Error('FSM attempted to set up interval in state ' + | ||
FSMStateHandle.prototype.timeout = function (timeout, cb) { | ||
mod_assert.number(timeout, 'timeout'); | ||
mod_assert.func(cb, 'cb'); | ||
if (!this.fsh_valid) { | ||
@@ -157,2 +165,3 @@ throw (new Error('FSM attempted to set up timeout in state ' + | ||
FSMStateHandle.prototype.immediate = function (cb) { | ||
mod_assert.func(cb, 'cb'); | ||
if (!this.fsh_valid) { | ||
@@ -169,2 +178,3 @@ throw (new Error('FSM attempted to set up immediate in state ' + | ||
FSMStateHandle.prototype.callback = function (cb) { | ||
mod_assert.func(cb, 'cb'); | ||
if (!this.fsh_valid) { | ||
@@ -244,2 +254,3 @@ throw (new Error('FSM attempted to set up callback in state ' + | ||
FSM.prototype.isInState = function (state) { | ||
mod_assert.string(state, 'state'); | ||
return (this.fsm_state === state || | ||
@@ -246,0 +257,0 @@ this.fsm_state.indexOf(state + '.') === 0); |
{ | ||
"name": "mooremachine", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Moore finite state machines", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
32471
348