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.4 to 0.2.5

23

dist/machine.js

@@ -35,2 +35,3 @@ 'use strict';

let reduce = fnType.bind(reduceType);
let action = fn => reduce((ctx, ev) => { fn(ctx, ev); return ctx; });

@@ -44,12 +45,6 @@ let guardType = {};

function extractActions(args) {
function makeTransition(from, to, ...args) {
let guards = stack(filter(guardType, args).map(t => t.fn), truthy, callBoth);
let reducers = stack(filter(reduceType, args).map(t => t.fn), identity, callForward);
return [guards, reducers];
}
let transitionType = {};
function transition(from, to, ...args) {
let [guards, reducers] = extractActions(args);
return create(transitionType, {
return create(this, {
from: valueEnumerable(from),

@@ -62,11 +57,6 @@ to: valueEnumerable(to),

let transitionType = {};
let immediateType = {};
function immediate(to, ...args) {
let [guards, reducers] = extractActions(args);
return create(immediateType, {
to: valueEnumerable(to),
guards: valueEnumerable(guards),
reducers: valueEnumerable(reducers)
});
}
let transition = makeTransition.bind(transitionType);
let immediate = makeTransition.bind(immediateType, null);

@@ -202,2 +192,3 @@ function enterImmediate(machine, service, event) {

exports.action = action;
exports.createMachine = createMachine;

@@ -204,0 +195,0 @@ exports.d = d;

@@ -31,2 +31,3 @@ function valueEnumerable(value) {

export let reduce = fnType.bind(reduceType);
export let action = fn => reduce((ctx, ev) => { fn(ctx, ev); return ctx; });

@@ -40,12 +41,6 @@ let guardType = {};

function extractActions(args) {
function makeTransition(from, to, ...args) {
let guards = stack(filter(guardType, args).map(t => t.fn), truthy, callBoth);
let reducers = stack(filter(reduceType, args).map(t => t.fn), identity, callForward);
return [guards, reducers];
}
let transitionType = {};
export function transition(from, to, ...args) {
let [guards, reducers] = extractActions(args);
return create(transitionType, {
return create(this, {
from: valueEnumerable(from),

@@ -58,11 +53,6 @@ to: valueEnumerable(to),

let transitionType = {};
let immediateType = {};
export function immediate(to, ...args) {
let [guards, reducers] = extractActions(args);
return create(immediateType, {
to: valueEnumerable(to),
guards: valueEnumerable(guards),
reducers: valueEnumerable(reducers)
});
}
export let transition = makeTransition.bind(transitionType);
export let immediate = makeTransition.bind(immediateType, null);

@@ -69,0 +59,0 @@ function enterImmediate(machine, service, event) {

{
"name": "robot3",
"version": "0.2.4",
"version": "0.2.5",
"description": "A function, immutable Finite State Machine library",

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