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

robot3

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

robot3 - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

dist/debug.js

14

machine.js

@@ -102,17 +102,19 @@ function valueEnumerable(value) {

};
function machineToPromise(machine) {
return function(ctx, ev) {
return new Promise(resolve => {
const machineToThen = machine => function(ctx, ev) {
return {
then: resolve => {
this.child = interpret(machine, s => {
this.onChange(s);
if(s.machine.state.value.final) {
delete this.child;
resolve(s.context);
}
}, ctx, ev);
});
return { catch: identity };
}
};
}
};
export function invoke(fn, ...transitions) {
return create(invokeType, {
fn: valueEnumerable(machine.isPrototypeOf(fn) ? machineToPromise(fn) : fn),
fn: valueEnumerable(machine.isPrototypeOf(fn) ? machineToThen(fn) : fn),
transitions: valueEnumerable(transitionsToMap(transitions))

@@ -119,0 +121,0 @@ });

{
"name": "robot3",
"version": "0.2.2",
"version": "0.2.3",
"description": "A function, immutable Finite State Machine library",
"main": "machine.js",
"main": "dist/machine.js",
"module": "machine.js",
"type": "module",
"files": [
"dist/",
"debug.js",

@@ -16,3 +17,5 @@ "machine.js"

"server": "http-server -p 1965",
"test": "node-qunit-puppeteer http://localhost:1965/test/test.html 10000"
"test": "node-qunit-puppeteer http://localhost:1965/test/test.html 10000",
"build": "rollup -d dist -f cjs machine.js debug.js",
"preversion": "npm run build"
},

@@ -40,4 +43,5 @@ "repository": {

"node-qunit-puppeteer": "^1.0.13",
"rollup": "^1.21.4",
"terser": "^4.3.1"
}
}
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