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

afsm

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

afsm - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

6

index.js
import EventEmitter from 'eventemitter3';
const instance = Symbol('instance');
// 中间过渡状态

@@ -124,2 +125,7 @@ export class MiddleState {

this.name = this.name || this.constructor.name;
const names = Object.getPrototypeOf(this)[instance];
if (!names)
Object.getPrototypeOf(this)[instance] = { name: this.name, count: 0 };
else
this.name = names.name + "-" + names.count++;
if (hasDevTools)

@@ -126,0 +132,0 @@ window.dispatchEvent(new CustomEvent("createAFSM", { detail: { name: this.name, diagram: this.stateDiagram } }));

@@ -5,2 +5,3 @@ import EventEmitter from 'eventemitter3';

}
const instance = Symbol('instance');
export type State = string | MiddleState;

@@ -103,2 +104,3 @@ // 中间过渡状态

static OFF = "off";
get stateDiagram() {

@@ -112,2 +114,5 @@ return [];

this.name = this.name || this.constructor.name;
const names = Object.getPrototypeOf(this)[instance];
if (!names) Object.getPrototypeOf(this)[instance] = { name: this.name, count: 0 };
else this.name = names.name + "-" + names.count++;
if (hasDevTools) window.dispatchEvent(new CustomEvent("createAFSM", { detail: { name: this.name, diagram: this.stateDiagram } }));

@@ -114,0 +119,0 @@ else if (inWorker) postMessage({ type: 'createAFSM', payload: { name: this.name, diagram: this.stateDiagram } });

2

package.json
{
"name": "afsm",
"version": "2.0.4",
"version": "2.0.5",
"description": "atomic fsm",

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

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