New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

state_lite

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

state_lite - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

tests/tests.html

2

package.json
{
"name": "state_lite",
"version": "0.1.5",
"version": "0.1.6",
"author": "Steelbreeze <mesmo@steelbreeze.net>",

@@ -5,0 +5,0 @@ "description": "Lightweight state machine library for JavaScript",

@@ -5,3 +5,3 @@ state_lite.js

The current beta version is: 0.1.5.
The current beta version is: 0.1.6.

@@ -11,6 +11,7 @@ If you like it, please star it...

#API
The exported API consists of one class, one enum and one function; briefly:
The exported API consists of one class, one enum and two functions; briefly:
* **[State](https://github.com/steelbreeze/state_lite.js/wiki/State)** class: defines the heirarchy of states within a state machine and their entry/exit behavior.
* **[History](https://github.com/steelbreeze/state_lite.js/wiki/History)** enum: used as an optional parameter to the State constructor defined either Shallow or Deep history semantics for composite states.
* **[transition](https://github.com/steelbreeze/state_lite.js/wiki/transition)** function: defined the transitions between states, their guard conditions and behavior.
* **[transition](https://github.com/steelbreeze/state_lite.js/wiki/transition)** function: defines the transitions between states, their guard conditions and behavior.
* **[completion](https://github.com/steelbreeze/state_lite.js/wiki/completion)** function: defines completion transitions between states, their guard conditions and behavior; completion transitions are evaluated after entry to states that are deemec to be complete.

@@ -17,0 +18,0 @@ Detailed documentation to follow in the project wiki... please bear with me...

@@ -46,2 +46,4 @@ /*

this.transitions = [];
this.entry = [];
this.exit = [];

@@ -77,6 +79,4 @@ // set the parent's initial state as necessary

// call the user-defined exit behaviour
if (this.exit) {
for (i = 0, len = this.exit.length; i < len; ++i) {
this.exit[i]();
}
for (i = 0, len = this.exit.length; i < len; ++i) {
this.exit[i]();
}

@@ -92,8 +92,6 @@ };

// call the user-defined entry behaviour
if (this.entry) {
for (i = 0, len = this.entry.length; i < len; ++i) {
this.entry[i]();
}
for (i = 0, len = this.entry.length; i < len; ++i) {
this.entry[i]();
}
// update the parent's current state

@@ -100,0 +98,0 @@ if (this.parent) {

Sorry, the diff of this file is not supported yet

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