Socket
Socket
Sign inDemoInstall

jssm

Package Overview
Dependencies
Maintainers
1
Versions
319
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jssm - npm Package Compare versions

Comparing version 0.17.1 to 0.18.0

4

package.json
{
"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;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc