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

mooremachine

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mooremachine - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

27

lib/fsm.js

@@ -150,1 +150,28 @@ // Copyright 2015 Joyent, Inc.

};
/*
* Wraps a conventional node callback async function up into an EventEmitter so
* that it can be used as a state transition trigger.
*/
FSM.wrap = function _fsmWrap(fun) {
function fsm_cb_wrapper() {
var args = Array.prototype.slice.call(arguments);
var eve = new EventEmitter();
var cb = function () {
var resArgs = Array.prototype.slice.call(arguments);
var err = resArgs.shift();
if (err) {
eve.emit('error', err);
} else {
resArgs.unshift('return');
eve.emit.apply(eve, resArgs);
}
};
args.push(cb);
eve.run = function () {
fun.apply(this, args);
};
return (eve);
}
return (fsm_cb_wrapper);
};

2

package.json
{
"name": "mooremachine",
"version": "1.0.0",
"version": "1.1.0",
"description": "Moore finite state machines",

@@ -5,0 +5,0 @@ "main": "lib/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