Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typescript-state-machine

Package Overview
Dependencies
Maintainers
8
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-state-machine - npm Package Compare versions

Comparing version 0.9.4 to 0.9.5

6

dist/index.d.ts

@@ -29,4 +29,4 @@ export declare namespace fsm {

checkInOneOfStates(states: T[], message?: string): void;
protected inOneOfStates(states: T[]): boolean;
protected inState(state: T): boolean;
inOneOfStates(states: T[]): boolean;
inState(state: T): boolean;
private invokeAllTransitionListeners;

@@ -39,4 +39,4 @@ private invokeTransitionListeners;

setState(newState: T): void;
canGoToState(newState: T): boolean;
private checkTransition;
protected canGoToState(newState: T): boolean;
}

@@ -43,0 +43,0 @@ interface Transitions<T> {

@@ -154,2 +154,5 @@ "use strict";

};
StateMachineImpl.prototype.canGoToState = function (newState) {
return this.validTransitions[this._state.label].indexOf(newState) !== -1;
};
StateMachineImpl.prototype.checkTransition = function (newState) {

@@ -160,5 +163,2 @@ if (!this.canGoToState(newState)) {

};
StateMachineImpl.prototype.canGoToState = function (newState) {
return this.validTransitions[this._state.label].indexOf(newState) !== -1;
};
return StateMachineImpl;

@@ -165,0 +165,0 @@ }());

{
"name": "typescript-state-machine",
"version": "0.9.4",
"version": "0.9.5",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -101,7 +101,7 @@ import { getLogger } from 'log4javascript'

protected inOneOfStates(states: T[]): boolean {
inOneOfStates(states: T[]): boolean {
return (states.indexOf(this._state) !== -1)
}
protected inState(state: T): boolean {
inState(state: T): boolean {
return this._state === state

@@ -197,2 +197,6 @@ }

canGoToState(newState: T): boolean {
return this.validTransitions[this._state.label].indexOf(newState) !== -1
}
private checkTransition(newState: T) {

@@ -203,6 +207,2 @@ if (!this.canGoToState(newState)) {

}
protected canGoToState(newState: T): boolean {
return this.validTransitions[this._state.label].indexOf(newState) !== -1
}
}

@@ -209,0 +209,0 @@

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