Comparing version 0.17.1 to 0.18.0
{ | ||
"name": "jssm", | ||
"version": "0.17.1", | ||
"version": "0.18.0", | ||
"description": "A Javascript state machine with a simple API. Well tested, and typed with Flowtype. MIT License.", | ||
@@ -29,5 +29,7 @@ "main": "dist/jssm.es5.browserified.js", | ||
"state", | ||
"state machine", | ||
"state-machine", | ||
"machine", | ||
"finite-state-machine", | ||
"finite state machine", | ||
"fsm", | ||
@@ -34,0 +36,0 @@ "fsm-library", |
@@ -83,3 +83,3 @@ | ||
name? : string, | ||
action? : string, | ||
action? : NT, | ||
check? : JssmTransitionPermitterMaybeArray<NT, DT>, // validate this edge's transition; usually about data | ||
@@ -86,0 +86,0 @@ probability? : number, // for stoch modelling, would like to constrain to [0..1], dunno how |
@@ -268,9 +268,18 @@ | ||
return [... (this._reverse_actions.get(whichState) || new Map()).values()] // wasteful | ||
.map( (edgeId:number) => this._edges[edgeId] ) // whargarbl burn out any | ||
.filter( o => o.from === whichState) | ||
.map( filtered => filtered.to ); | ||
.map ( (edgeId:number) => this._edges[edgeId] ) | ||
.filter ( (o:JssmTransition<mNT, mDT>) => o.from === whichState ) | ||
.map ( filtered => filtered.action ); | ||
} | ||
probable_action_exits_at(whichState : mNT) : Array<mNT> { | ||
return [... (this._reverse_actions.get(whichState) || new Map()).values()] // wasteful | ||
.map ( (edgeId:number) => this._edges[edgeId] ) | ||
.filter ( (o:JssmTransition<mNT, mDT>) => o.from === whichState ) | ||
.map ( filtered => ( { action : filtered.action, | ||
probability : filtered.probability } ) | ||
); | ||
} | ||
is_unenterable(whichState : mNT) : boolean { | ||
@@ -277,0 +286,0 @@ return this.entrances_for(whichState).length === 0; |
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
45242
653