Giter Site home page Giter Site logo

vstirbu / fsm-as-promised Goto Github PK

View Code? Open in Web Editor NEW
464.0 10.0 27.0 250 KB

A finite state machine library using ES6 promises

License: MIT License

JavaScript 78.62% HCL 0.63% TypeScript 20.75%
finite-state-machine javascript promise es6-promise state-machine fsm hacktoberfest

fsm-as-promised's Introduction

Finite State Machine as Promised

A minimalistic finite state machine library for browser and node implemented using promises.

NPM Version NPM License Build Status Coverage Status Code Climate Greenkeeper badge Known Vulnerabilities NPM Downloads

Gitter

πŸ“’ For Visual Studio Code users: checkout the UML visualization extension.

How to use

Installation and Setup

Run npm install fsm-as-promised to get up and running. Then:

// ES5
const StateMachine = require('fsm-as-promised');

// ES6
import StateMachine from 'fsm-as-promised';

Configuring promise library

StateMachine.Promise = YourChoiceForPromise

You can choose from the following promise libraries:

If the environment does not provide Promise support, the default implementation is es6-promise.

The library works also with the promise implementation bundled with es6-shim.

Create finite state machine

A state machine object can be created by providing a configuration object:

const fsm = StateMachine({
  events: [
    { name: 'wait', from: 'here'},
    { name: 'jump', from: 'here', to: 'there' },
    { name: 'walk', from: ['there', 'somewhere'], to: 'here' }
  ],
  callbacks: {
    onwait: function () {
      // do something when executing the transition
    },
    onleavehere: function () {
      // do something when leaving state here
    },
    onleave: function () {
      // do something when leaving any state
    },
    onentersomewhere: function () {
      // do something when entering state somewhere
    },
    onenter: function () {
      // do something when entering any state
    },
    onenteredsomewhere: function () {
      // do something after entering state somewhere
      // transition is complete and events can be triggered safely
    },
    onentered: function () {
      // do something after entering any state
      // transition is complete and events can be triggered safely
    }
  }
});

Define events

The state machine configuration contains an array of event that convey information about what transitions are possible. Typically a transition is triggered by an event identified by name, and happens between from and to states.

Define callbacks

The state machine configuration can define callback functions that are invoked when leaving or entering a state, or during the transition between the respective states. The callbacks must return promises or be thenable.

Initialisation options

Initial state

You can define the initial state by setting the initial property:

const fsm = StateMachine({
  initial: 'here',
  events: [
    { name: 'jump', from: 'here', to: 'there' }
  ]
});

console.log(fsm.current);
// here

otherwise the finite state machine's initial state is none.

Final states

You can define the final state or states by setting the final property:

const fsm = StateMachine({
  initial: 'here',
  final: 'there', //can be a string or array
  events: [
    { name: 'jump', from: 'here', to: 'there' }
  ]
});

Target

An existing object can be augmented with a finite state machine:

const target = {
      key: 'value'
    };

StateMachine({
  events: [
    { name: 'jump', from: 'here', to: 'there' }
  ],
  callbacks: {
    onjump: function (options) {
      // accessing target properties
      console.log(target.key === this.key);
    }
  }
}, target);

target.jump();

Custom error handler

You can override the default library error handler by setting the error property:

const fsm = StateMachine({
  initial: 'red',
  events: [
    { name: 'red', from: 'green', to: 'red' }
  ],
  error: function customErrorHandler(msg, options) {
    throw new Error('my error');
  }
});

The value of the error property is a function that expects two arguments:

  • msg a string containing the error reason
  • options an object havin as properties the name of the transition and the from state when the error occurred.

Callbacks

Arguments

The following arguments are passed to the callbacks:

const fsm = StateMachine({
    events: [
      { name: 'jump', from: 'here', to: 'there' }
    ],
    callbacks: {
      onjump: function (options) {
        // do something with jump arguments
        console.log(options.args);

        // do something with event name
        console.log(options.name);

        // do something with from state
        console.log(options.from);

        // do something with to state
        console.log(options.to);

        return options;
      }
    }
  });

fsm.jump('first', 'second');

Synchronous

You can define synchronous callbacks as long as the callback returns the options object that is going to be passed to the next callback in the chain:

const fsm = StateMachine({
    events: [
      { name: 'jump', from: 'here', to: 'there' }
    ],
    callbacks: {
      onjump: function (options) {
        // do something

        return options;
      }
    }
  });

fsm.jump();

Asynchronous

You can define asynchronous callbacks as long as the callback returns a new promise that resolves with the options object when the asynchronous operation is completed. If the asynchronous operation is unsuccessful, you can throw an error that will be propagated throughout the chain.

const fsm = StateMachine({
    events: [
      { name: 'jump', from: 'here', to: 'there' }
    ],
    callbacks: {
      onjump: function (options) {
        return new Promise(function (resolve, reject) {
          // do something
          resolve(options);
        });
      }
    }
  });

await fsm.jump();

Call order

The callbacks are called in the following order:

callback state in which the callback executes
onleave{stateName} from
onleave from
on{eventName} from
onenter{stateName} from
onenter from
onentered{stateName} to
onentered to

A state is locked if there is an ongoing transition between two different states. While the state is locked no other transitions are allowed.

If the transition is not successful (e.g. an error is thrown from any callback), the state machine returns to the state in which it is executed.

Returned values

By default, each callback in the promise chain is called with the options object.

Passing data between callbacks

Callbacks can pass values that can be used by subsequent callbacks in the promise chain.

const fsm = StateMachine({
  initial: 'one',
  events: [
    { name: 'start', from: 'one', to: 'another' }
  ],
  callbacks: {
    onleave: function (options) {
      options.foo = 2;
    },
    onstart: function (options) {
      // can use options.foo value here
      if (options.foo === 2) {
        options.foo++;
      }
    },
    onenter: function (options) {
      // options.foo === 3
    }
  }
});

This also includes callbacks added to the chain by the user.

fsm.start().then(function (options) {
  // options.foo === 3
});

Beyond the library boundary

The options object can be hidden from the promises added by the end user by setting the options.res property. This way the subsequent promises that are not part of the state machine do not receive the options object.

const fsm = StateMachine({
  initial: 'one',
  events: [
    { name: 'start', from: 'one', to: 'another' }
  ],
  callbacks: {
    onstart: function (options) {
      options.res = {
        val: 'result of running start'
      };
    }
  }
});

const result = await fsm.start();

console.log(result);

Configuring callback prefix

By default, the callback names start with on. You can omit the prefix by setting it to empty string or assign any other prefix:

StateMachine.callbackPrefix = 'customPrefix';

Common Methods

The library adds the following utilities to the finite state machine object:

  • can(event) checks if the event can be triggered in the current state,
  • cannot(event) checks if the event cannot be triggered in the current state,
  • is(state) checks if the state is the current state,
  • isFinal(state) checks if the state is final state. If no state is provided the current state is checked.
  • hasState(state) checks if the finite state machine has the state.
  • instanceId returns the uuid of the instance

Emitted Events

The finite state machine object is an EventEmitter. By default, the library emits state event whenever the state machine enters a new state.

You can define and emit new events.

Handling Errors

Errors thrown by any of the callbacks called during a transition are propagated through the promise chain and can be handled like this:

fsm.jump().catch(function (err) {
  // do something with err...
  // err.trigger - the event that triggered the error
  // err.current - the current state of the state machine
  // err.message - described bellow...
  // err.pending - an object containing the description of intra-state pending transitions
});

The library throws errors with the following messages:

message explanation note
Ambigous transition The state machine has one transition that starts from one state and ends in multiple must be fixed during design time
Previous transition pending The previous intra-state transition(s) is in progress preventing new ones until it has completed -
Previous inter-state transition started Inter-state transition started -
Invalid event in current state The state machine is in a state that does not allow the requested transition -

⚠️ Unhandled errors may lead to inconsistent state machine. If you reserved resources as part of a transition, you have to release them if an error occured.

Graceful error recovery

It is not advisable to let the errors that can be handled gracefully at callback level to propagate to the end of the promise chain.

The following is an example where the error is handled inside a synchronous callback:

const fsm = StateMachine({
  initial: 'green',
  events: [
    { name: 'warn',  from: 'green',  to: 'yellow' }
  ],
  callbacks: {
    onwarn: function (options) {
      try {
        throw new Error('TestError');
      } catch (err) {
        // handle error
        return options;
      }
    }
  }
});

await fsm.warn()

fsm.current === 'yellow';
// true

The same inside an asynchronous callback:

const fsm = StateMachine({
  initial: 'green',
  events: [
    { name: 'warn',  from: 'green',  to: 'yellow' }
  ],
  callbacks: {
    onwarn: function (options) {
      return new StateMachine.Promise(function (resolve, reject) {
        reject(new Error('TestError'));
      }).catch(function (err) {
        // handle error
        return options;
      });
    }
  }
});
  
await fsm.warn()

fsm.current === 'yellow';
// true

Recipes

Conditional transitions

The library provides a way to define conditional transitions:

StateMachine({
  events: [
    { name: 'conditional',
      from: 'init',
      to: ['one', 'two'],
      condition: function (options) {
        return 0; // transition to state 'one'
      }
    }
  ]
});

The above is equivalent to:

StateMachine({
  events: [
    { name: 'conditional',
      from: 'init',
      to: ['one', 'two'],
      condition: function (options) {
        return 'one'; // transition to state 'one'
      }
    }
  ]
});

The condition callback must return the to Array's index of the selected state, the name of the selected state, or a promise which resolves to either. The condition callback is executed after on{eventName} callback.

If the above is not suitable, complex conditional transitions can be achieved through transitioning explicitly to a pseudo state where the condition is checked, then the appropriate event is triggered:

StateMachine({
  events: [
    { name: 'trigger', from: 'existing', to: 'pseudo' },
    { name: 'triggerOptionA', from: 'pseudo', to: 'option-a' },
    { name: 'triggerOptionB', from: 'pseudo', to: 'option-b' }
  ],
  callbacks: {
    onenteredpseudo: function () {
      if (condition) {
        this.triggerOptionA();
      } else {
        this.triggerOptionB();
      }
    }
  }
});

If your pseudo state's callback returns a Promise, you must return the call to the event function; e.g. return this.triggerOptionA().

Tooling

Visual Studio Code extension

You can visualize the state machine as a UML diagram in vscode using the Finite state machine viewer extension.

UML visualization

The state machine definitions can be visualized as UML diagrams using fsm2dot.

Install fsm2dot and graphviz, then:

fsm2dot -f fsm.js -o fsm.dot
dot -Tpdf fsm.dot -o fsm.pdf

Contributing

Install the library and run tests:

npm install
npm test

License

The library is available under the MIT license.

Credits

The framework is heavily influenced by Jake Gordon's javascript-state-machine.

fsm-as-promised's People

Contributors

boneskull avatar greenkeeper[bot] avatar greenkeeperio-bot avatar hadrien-toma avatar koresar avatar stonecypher avatar teachrdan avatar v3g42 avatar vstirbu avatar yarandoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fsm-as-promised's Issues

An in-range update of @types/node is breaking the build 🚨

Version 8.0.57 of @types/node was just published.

Branch Build failing 🚨
Dependency @types/node
Current Version 8.0.56
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
  • βœ… coverage/coveralls First build on greenkeeper/@types/node-8.0.57 at 97.861% Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

Version 8.5.3 of @types/node was just published.

Branch Build failing 🚨
Dependency @types/node
Current Version 8.5.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… coverage/coveralls First build on greenkeeper/@types/node-8.5.3 at 97.861% Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of rsvp is breaking the build 🚨

Version 4.8.3 of rsvp was just published.

Branch Build failing 🚨
Dependency rsvp
Current Version 4.8.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

rsvp is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 9 commits.

  • 879fe32 release v4.8.3 πŸŽ‰
  • f81b8d4 Merge pull request #534 from bekzod/update-libs
  • d306869 bump deps
  • 238f66b Merge pull request #495 from bekzod/align-things
  • 3165323 allow passing promise values to hash/map/hashSettled
  • ae7dacd Merge pull request #533 from toddjordan/document-new-import-scheme
  • 53a6479 Merge pull request #532 from bekzod/update-lib
  • 5b238c9 Update documentation for the new way Ember does imports for rsvp
  • 71ab9f6 update dependencies

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

FSM object as event emitter

With this feature the FSM object is able to emit events on state changes when the provided target object is an instance of EventEmitter, or by default when no target is provided:

      var fsm = StateMachine({
        initial: 'here',
        events: [
          { name: 'jump', from: 'here', to: 'there' },
          { name: 'walk', from: 'there', to: 'here' }
        ]
      });

      fsm.on('state', function (newState) {
        // do something when newState has some value
      });

The rationale behind this feature is that it enables the fsm state to be observed without hooking into the promise chain.

A prototype implementation is available in the the emitter branch.

cc: @boneskull

An in-range update of pinkie is breaking the build 🚨

Version 2.0.5 of pinkie was just published.

Branch Build failing 🚨
Dependency pinkie
Current Version 2.0.4
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

pinkie is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ coverage/coveralls Coverage pending from Coveralls.io Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Dangerous Behavior

Hi there,

Please take a look at this simple code.

const Promise = require('bluebird');
const StateMachine = require('fsm-as-promised');
StateMachine.Promise = Promise;

var fsm = StateMachine({
    initial: 'here',
    events: [
      { name: 'jump', from: 'here', to: 'sky' },
      { name: 'run',  from: 'here', to: 'office' },
    ],
    callbacks: {
      onjump: function (options) {
        return new Promise(function (resolve, reject) {
          resolve(options);
        });
      }
    }
  });

fsm.jump().then((a) => {
  console.log('jump', fsm.current, a);
}).catch((err) => {
  console.log('err jump', err);
});

fsm.run().then((a) => {
  console.log('run', fsm.current, a);
}).catch((err) => {
  console.log('err run', err);
});

I thought fsm.jump() will succeed and fsm's state will be sky and fsm.run() will fail because fsm's state has already been changed to sky.

But the result is as follows.

jump office { name: 'jump', from: 'here', to: 'sky', args: [] }
run office { name: 'run', from: 'here', to: 'office', args: [] }

jump office !?

jump can only go to the sky...

I know jump() and run() are not connected with a promise chain so while jump() was being processed, run() was executed and run()'s result was taken effect at last.
I believe run() should throw an error or return a promise reject when it's called while other events are being processed..

I think this is very dangerous.

Cheers

An in-range update of sinon is breaking the build 🚨

Version 5.0.9 of sinon was just published.

Branch Build failing 🚨
Dependency sinon
Current Version 5.0.8
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
  • βœ… coverage/coveralls First build on greenkeeper/sinon-5.0.9 at 98.02% Details

Commits

The new version differs by 5 commits.

  • 86b930c Update docs/changelog.md and set new release id in docs/_config.yml
  • 033aa60 Add release documentation for v5.0.9
  • 3321085 5.0.9
  • 9f321d5 Update History.md and AUTHORS for new release
  • e862196 Upgrade @std/esm to esm.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Cancelling a transition

Hi,

Great library so far! I just have some doubts about the best way to cancel a transition from within the transition event(I.e: stay in the current state and do not enter the new one)? Will throwing an exception be enough? I got a bit mislead by the following documentation line, and would like to confirm.

⚠️ Unhandled errors may lead to inconsistent state machine.

Ie:

function cancelTransition(message) {
    throw new TransitionCancelled(message);
}
function onSomeTransition(options) {
    if (maxAllowed) {
        cancelTransition();
    }
    return options;
}

(node:31608) Warning: a promise was created in a handler but was not returned from it

Calling either stateMachine.jump('first', 'second'); or stateMachine.jump('first', 'second').then(...); seems to result in an unhandled Promise somewhere inside the state machine:

(node:31608) Warning: a promise was created in a handler but was not returned from it

Haven't digged into the code yet, but it should be possible to get rid of this, shouldn't it?

An in-range update of sinon is breaking the build 🚨

Version 5.0.10 of sinon was just published.

Branch Build failing 🚨
Dependency sinon
Current Version 5.0.9
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
  • βœ… coverage/coveralls First build on greenkeeper/sinon-5.0.10 at 98.02% Details

Commits

The new version differs by 9 commits.

  • 4313d2d Update docs/changelog.md and set new release id in docs/_config.yml
  • e21c92a Add release documentation for v5.0.10
  • 41d0dcb 5.0.10
  • 928379c Update History.md and AUTHORS for new release
  • 5ca48d3 Merge pull request #1802 from ifrost/feature/restore-default-sandbox-fake-timers
  • 087bc1c Cache reverse function
  • d19a4c0 Add issue number
  • 6799e1c Use fakeTimers in the default sandbox
  • 8b6f8a8 Revert spied fakeTimers to original state

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of bluebird is breaking the build 🚨

Version 3.5.2 of bluebird was just published.

Branch Build failing 🚨
Dependency bluebird
Current Version 3.5.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

bluebird is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/bluebird-3.5.2 at 98.02% (Details).

Release Notes v3.5.2

Bugfixes:

  • Fix PromiseRejectionEvent to contain .reason and .promise properties. (#1509, #1464)
  • Fix promise chain retaining memory until the entire chain is resolved (#1544, #1529)

id: changelog
title: Changelog

Commits

The new version differs by 22 commits.

  • 50067ec Release v3.5.2
  • f290da0 Fix memory being retained until promise queue is completely empty (#1544)
  • ad6d763 Update benchmarks (#1539)
  • 49da1ac Fix a typo. (#1534)
  • b06106a Fix typo in readme introduced in #1530 (#1531)
  • c1dc5b9 Update README.md (#1530)
  • e35455f chore: clone last 5 commits (#1521)
  • 91ae9ce chore: add Node.js 10 (#1523)
  • 9159472 Added a simple usage example (#1369)
  • 39081ba Update promise.each.md (#1479)
  • 77781fe Fix header (#1513)
  • b8eedc1 Update LICENSE to 2018 (#1490)
  • 4163e82 Added ES6 way to import the bluebird promise (#1461)
  • 3790a92 DOC: add direct link to Promise.delay from API ref (#1465)
  • e8d8525 Update error documentation (#1469)

There are 22 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of uuid is breaking the build 🚨

The dependency uuid was updated from 3.3.2 to 3.3.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

uuid is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • βœ… coverage/coveralls: First build on greenkeeper/uuid-3.3.3 at 98.02% (Details).
  • βœ… continuous-integration/travis-ci/push: The Travis CI build passed (Details).
  • ❌ test: Failed!
  • βœ… install: Succeeded

Commits

The new version differs by 3 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of sinon is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 4.4.1 of sinon was just published.

Branch Build failing 🚨
Dependency sinon
Current Version 4.4.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
  • βœ… coverage/coveralls First build on greenkeeper/sinon-4.4.1 at 98.02% Details

Commits

The new version differs by 9 commits.

  • c105a46 Update docs/changelog.md and set new release id in docs/_config.yml
  • 432a284 Add release documentation for v4.4.1
  • 9b4870e 4.4.1
  • a14d96f Update History.md and AUTHORS for new release
  • ae22a33 merge doc changes to released versions
  • 4cf8a83 correct eslint statements
  • 7380a03 add tests to verify asserts on spyCalls
  • 6e7e71f Update docs
  • cbc5667 Document that it is allowed to assert on dedicated spy calls.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Previous transition pending

Hi,

We are receiving a very sporadic issue in our logs:

'Previous transition pending. Options received: {"name":"archive","from":"IN_USE","to":"ARCHIVED","args":[]}',

I wonder which is the cause of this, as this is a very simple event: "Archive". And it is working 99% of the times. (Only changing the state and persisting it into the DB).

{ from: states.IN_USE, to: states.ARCHIVED, name: 'archive' },

We have multiple instances of the same stateMachine definition, in memory, at the same time. Is there any reason that one state machine instance can be conflicting with the state of a different state machine?

Any ideas on this weird behaviour would be appreciated.

In the underlying implementation is there any state shared across the different state machine instances that could be affecting this?

An in-range update of uuid is breaking the build 🚨

Version 3.3.0 of uuid was just published.

Branch Build failing 🚨
Dependency [uuid](https://github.com/kelektiv/node-uuid)
Current Version 3.2.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

uuid is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
  • βœ… coverage/coveralls First build on greenkeeper/uuid-3.3.0 at 98.02% Details

Commits

The new version differs by 17 commits ahead by 17, behind by 1.

  • 1cb9826 chore(release): 3.3.0
  • f3e48ff fix: fix #229
  • 854df05 chore: update dev dependencies (to fix security alerts)
  • 02161b2 Merge branch 'master' of github.com:kelektiv/node-uuid
  • beffff8 fix: assignment to readonly property to allow running in strict mode (#270)
  • 931c70d Merge branch 'master' of github.com:kelektiv/node-uuid
  • 0705cd5 feat: enforce Conventional Commit style commit messages (#282)
  • 2e33970 chore: Add Active LTS and Active versions of Node.js (#279)
  • 205e0ed fix: Get correct version of IE11 crypto (#274)
  • d062fdc fix: assignment to readonly property to allow running in strict mode (#270)
  • c47702c fix: mem issue when generating uuid (#267)
  • cc9a182 feat: enforce Conventional Commit style commit messages (#282)
  • 44c7f9f Add Active LTS and Active versions of Node.js (#279)
  • 153d331 fix: Get correct version of IE11 crypto (#274)
  • df40e54 fix assignment to readonly property to allow running in strict mode (#270)

There are 17 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected πŸ€–


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

conditional-transition: conditioner will not be completed, introduced fsm hung.

1.To create more than 1 fsm with the same config,
const cfg = {
...
events: {
...
{
name: 'step',
from: 'init',
to: ['a', 'b', 'c'],
condition: function (options) {
const {args:[{instanceid, id}]} = options;
console.log(instanceid(${instanceid}) ID:{id:${id}- method condition was called);
return new Promise(function (resolve, reject) {
resolve(id%3);
});
},
},
...
}
...
}

fsm_(1...n) = StateMachine({...cfg});

  1. using those fsm in different concurrent workers, pass the args to the machine
    fsm_(n) .step({instanceid: fsm_(n).instanceId(), id: a_random_num});

concurrent process data by different fsm created above, the condition method will not be called properly and the state machine was broken.

An in-range update of stampit is breaking the build 🚨

The dependency stampit was updated from 4.1.2 to 4.2.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

stampit is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 5 commits.

  • 11b1aaa 4.2.0
  • 338bb3f Merge pull request #338 from stampit-org/stamp-name
  • bbbcef4 Fix lint
  • 395ab58 Add another non-spec metadata - "name" to change factory name
  • 378a234 added "homepage"

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of sinon is breaking the build 🚨

The devDependency sinon was updated from 7.3.2 to 7.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… continuous-integration/travis-ci/push: The Travis CI build passed (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/sinon-7.4.0 at 98.02% (Details).
  • ❌ test: Failed!
  • ❌ tag-filter: Skipped
  • βœ… test: Succeeded
  • βœ… install: Succeeded
  • βœ… install: Succeeded

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

passing options between callbacks & error handling

Please see this REPL for an example.

Everything is fine & dandy until a callback throws an exception, which interrupts the promise chain.

Because there's nowhere to recover, the value of foo is lost, and depending on where the exception occurred, the FSM may not even enter the started state.

Using the new EventEmitter functionality would mitigate some of this, as a failing event handler shouldn't interrupt the promise chain (right?). However, using the EventEmitter method, the user cannot pass data between the callbacks.

Potential solutions:

  • A new callback, onerror(), which would give the user a chance to recover if a callback is rejected.
  • onerror() may be insufficient, since it may be difficult to tell which callback failed--and even if you could, you'd end up with conditionals or a switch statement in your error handling callback. So, perhaps every potential callback needs an error handling callback. onleavestoppederror(), onleaveerror(), onstarterror(), etc.
  • Any new callbacks should be called with options still, or any extra data is lost; perhaps the error or rejected value could live in options.err.
  • Instead, recover from all callbacks and pass any rejected values into options.err.
  • Ignore this altogether and expect the user to recover from any failure in a callback. This should probably be stated explicitly in the documentation, however.

(This other REPL may be a good example of how to pass data between event handlers--might want to put it in the docs?)

question: callback naming convention

All callbacks begin with on and must be lowercase, correct?

Is there a reason they must be named this way? Can the on prefix be entirely eliminated?

Onenter event should not fire for pseudo states?

We currently use the "onenter" event to save to the database every time we transition to a new state. We found that this event is being fired for the pseudo states that are created as part of the Conditional logic. So every time the FSM transition to this pseudo states an on enter event gets fired and we are saving this state that does not belong to our application domain logic.

We have a workaround to discard the "onenter" event if the TO field contains a string __ as this is the naming convention for pseudo events. This does not make our code base nicer and the use of the library is not as elegant as it could be.

  • Do you think it would be nice to stop firing events for the pseudo states? Would the FSM still work or is it relying on this events for the internal implementation of conditionals?

Suspend/Resume state machine

This feature would enable a state machine object to be suspended. Ideally the state machine should have a suspend method that returns an object containing the current state as well as the internal state.

A suspended state machine can be resumed using the object returned by the suspend method.

An in-range update of promise is breaking the build 🚨

The devDependency promise was updated from 8.0.3 to 8.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

promise is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/promise-8.1.0 at 98.02% (Details).

Commits

The new version differs by 7 commits.

  • e9c12a2 feat: support ES2015 iterables in all() and race() (#160)
  • 81b5722 docs: add "Enterprise Support" to README
  • 6d91fa0 Create FUNDING.yml
  • affd5e2 ci: update supported node versions
  • 6272338 adding Promise.race documentation and reference to proper API docs (#155)
  • 44f6d7a Fix typo: optimistically
  • f643fd6 Release 8.0.3

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of lodash is breaking the build 🚨

The dependency lodash was updated from 4.17.11 to 4.17.12.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

lodash is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • βœ… continuous-integration/travis-ci/push: The Travis CI build passed (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/lodash-4.17.12 at 98.02% (Details).
  • ❌ test: Failed!
  • βœ… install: Succeeded

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of sinon is breaking the build 🚨

Version 4.1.4 of sinon was just published.

Branch Build failing 🚨
Dependency sinon
Current Version 4.1.3
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ coverage/coveralls Coverage pending from Coveralls.io Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes Minor fix for Symbol names and deprecation of spy.reset
  • Fix: assertion error messages did not handle Symbol names (#1640)
  • Deprecate spy.reset(), use spy.resetHistory() instead (#1446)
Commits

The new version differs by 36 commits.

  • 1ea2749 Update docs/changelog.md and set new release id in docs/_config.yml
  • 078c082 Add release documentation for v4.1.4
  • 571263e 4.1.4
  • f2ee9f1 Update History.md and AUTHORS for new release
  • a8262dd Assertion error messages handle symbolic method names
  • 8fa1e14 Merge pull request #1641 from mroderick/point-to-stack-overflow
  • 7c1ebd0 Update issue links to point to sinonjs/sinon
  • 93418f6 Update documentation to emphasize Stack Overflow
  • ca9e2fa Merge pull request #1636 from fearphage/fix-headless-chrome-in-circle
  • 39186f4 use google-chrome-unstable for tests
  • 6315621 invalidate cache
  • d078af9 try using default chrome install
  • 177c4b6 upgraded to the lastest official version of mochify
  • ecdc4e0 test with updated mochify
  • 360c2e7 added more details and notes

There are 36 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of stampit is breaking the build 🚨

The dependency stampit was updated from 4.2.0 to 4.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

stampit is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • βœ… continuous-integration/travis-ci/push: The Travis CI build passed (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/stampit-4.3.0 at 98.02% (Details).
  • ❌ test: Failed!
  • βœ… install: Succeeded

Commits

The new version differs by 8 commits.

  • 3e08c44 4.3.0
  • 3a2617a Merge pull request #346 from stampit-org/getters-setters
  • d3b47c0 Do not lint on CI
  • 9a36121 Drop node 4 support. Add node 10,11,12 support
  • 17e3118 Fix vulnerabilities, run browser tests
  • 90eb0bc Remove outdated deps, update some other, simplify eslint config
  • 35a7db1 Remove not (yet) needed lines. Allow stampit to be slower than classes 500 times instead of 50
  • c1a9a72 Add support for getters/setters in any of the metadata.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of bluebird is breaking the build 🚨

The devDependency bluebird was updated from 3.5.2 to 3.5.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

bluebird is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v3.5.3

Bugfixes:

  • Update acorn dependency
Commits

The new version differs by 7 commits.

  • a5a5b57 Release v3.5.3
  • c8a7714 update packagelock
  • 8a765fd Update getting-started.md (#1561)
  • f541801 deps: update acorn and add acorn-walk (#1560)
  • 247e512 Update promise.each.md (#1555)
  • e2756e5 fixed browser cdn links (#1554)
  • 7cfa9f7 Changed expected behaviour when promisifying (#1545)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of es6-promise is breaking the build 🚨

Version 4.2.0 of es6-promise was just published.

Branch Build failing 🚨
Dependency es6-promise
Current Version 4.1.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

es6-promise is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
  • βœ… coverage/coveralls First build on greenkeeper/es6-promise-4.2.0 at 97.861% Details

Commits

The new version differs by 18 commits.

  • b87f240 release v4.2.0 πŸŽ‰
  • 2faa619 Merge pull request #312 from stefanpenner/remove-dist
  • aed7aed [fixes #231]
  • 915dc5d Update README.md
  • 110dc75 restore minified files to repo (really need to start publishing these
  • 64493b6 Merge pull request #289 from stefanpenner/cleanup
  • 9d97fb8 cleanup
  • d8f56ac Merge pull request #233 from stefanpenner/promise.finally
  • 14ca840 Promise.prototype.finally [fixes #232]
  • 18897d3 Merge pull request #310 from stefanpenner/updates
  • 8f96141 updates
  • 44298db Merge pull request #304 from Lcfvs/patch-1
  • 08a8a4d Bump ember-cli dep
  • e1bb7b6 Merge pull request #306 from LukasDrgon/patch-1
  • 4f078b2 Add CDN links

There are 18 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Upgrade actions

Current actions are v1 and have been deprecated by GitHub.

Add the following workflows:

  • test on pull request
  • publish on tag
  • remove travis workflow

An in-range update of es6-shim is breaking the build 🚨

The devDependency es6-shim was updated from 0.35.3 to 0.35.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

es6-shim is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 25 commits.

  • 271142c v0.35.4
  • d6a3484 [Tests] Temporarily skip this test, since it fails on newer engines
  • 3df305e [Tests] up to node v11.0, v10.12, v8.12
  • f9b0d7d [Dev Deps] update es5-shim, eslint
  • 01a8d2d [Fix] protect against evil build processes by ensuring these feature tests donβ€˜t look like no-ops that are safe to remove
  • da59510 [Tests] up to node v10.8
  • 8583cbe [Dev Deps] update eslint, @ljharb/eslint-config, grunt-contrib-watch, jshint
  • 4a81503 [Docs] Tweaking documentation specifying inclusion order
  • b9fcba3 Correct version numbers for .min files
  • 76e9eed [Tests] up to node v10.0, v9.11, v8.11, v6.14, v4.9; use nvm install-latest-npm
  • 4d5c6ca [Dev Deps] update eslint, @ljharb/eslint-config, es5-shim, evalmd, jshint, mocha
  • c6ba6a5 Only apps should have lockfiles
  • 738bc7b [Dev Deps] update mocha
  • 8d7aec1 [Fix] broken hasULPDistance β†’ working withinULPDistance helper
  • 6d65367 [Tests] acosh: fix precision (#338)

There are 25 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of sinon is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 4.4.7 of sinon was just published.

Branch Build failing 🚨
Dependency sinon
Current Version 4.4.6
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 7 commits.

  • e060fe9 Update docs/changelog.md and set new release id in docs/_config.yml
  • e9fce06 Add release documentation for v4.4.7
  • f047838 4.4.7
  • cc91fe6 Update History.md and AUTHORS for new release
  • 9fb8577 Emojify the support message :heart:
  • a87ef85 Use existing mini-lib for coloring
  • 1f33fe5 Reduce noisy NPM output from postinstall script

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of sinon is breaking the build 🚨

Version 4.1.6 of sinon was just published.

Branch Build failing 🚨
Dependency sinon
Current Version 4.1.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… coverage/coveralls First build on greenkeeper/sinon-4.1.6 at 97.861% Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 10 commits.

  • 68c37ed Update docs/changelog.md and set new release id in docs/_config.yml
  • cd8ae51 Add release documentation for v4.1.6
  • 29e80be 4.1.6
  • a5c59a5 Update History.md and AUTHORS for new release
  • 0ae60b6 Merge pull request #1653 from mroderick/upgrade-dependencies
  • dcd4191 Upgrade browserify to latest
  • a316f02 Upgrade markdownlint-cli to latest
  • 78ebdb3 Upgrade lint-staged to latest
  • fcf967b Upgrade dependency supports-color
  • 7c3cb4f Enable StaleBot with default configuration (#1649)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

Version 8.0.53 of @types/node was just published.

Branch Build failing 🚨
Dependency @types/node
Current Version 8.0.52
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
  • βœ… coverage/coveralls First build on greenkeeper/@types/node-8.0.53 at 97.861% Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

`Invalid event in current state` error handling

The library is not able to distinguish between Invalid event in current state errors thrown by different fsm instances:

const other = StateMachine({
  initial: 'one',
  events: [
    { name: 'init', from: 'one', to: 'two' },
    { name: 'crash', from: 'two' }
  ]
});

const fsm = StateMachine({
  initial: 'here',
  events: [
    { name: 'stay', from: 'here' },
    { name: 'move', from: 'here', to: 'there' }
  ],
  callbacks: {
    onstay: function(opts) {
      // throws a FsmError from a different fsm instance
      return other.crash();
    }
  }
});

fsm.stay().catch((e) => {
  fsm.move(); // throws error
});

enhancement: need more error-handling options

given setup:

const fsm = StateMachine({
  events: [
    {name: 'foo', from: 'none', to: 'done'}
  ],
  final: 'done'
});

Let's say foo() is part of your public API. The user calls fsm.foo() and everything's fine; but then the user calls fsm.foo() again, resulting in an "invalid state transition"-type Error. AFAIK, there's no way to customize how this is handled.

The naive solution here would be adding more supported callbacks.

An in-range update of mocha is breaking the build 🚨

Version 5.0.1 of mocha was just published.

Branch Build failing 🚨
Dependency mocha
Current Version 5.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
  • βœ… coverage/coveralls First build on greenkeeper/mocha-5.0.1 at 98.02% Details

Commits

The new version differs by 15 commits.

  • 09ce746 Release v5.0.1
  • 70027b6 update changelog for v5.0.1 [ci skip]
  • 44aae9f add working wallaby config
  • 412cf27 [Update] license year
  • b7377b3 rename help-wanted to "help wanted" in stale.yml
  • d975a6a fix memory leak when run in v8; closes #3119
  • 3509029 update .gitignore to only ignore root mocha.js [ci skip]
  • b57f623 fix: When using --delay, .only() no longer works. Issue #1838
  • cd74322 Slight copy update on docs for test directory
  • f687d2b update docs for the glob
  • 14fc030 Add all supported wallaby editors
  • 2e7e4c0 rename "common-mistake" label to "faq"
  • bca57f4 clarify docs on html, xunit and 3p reporters; closes #1906
  • 2fe2d01 Revert "fix travis "before script" script"
  • c0ac1b9 fix travis "before script" script

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Conditional branching

This seems like sort of a given for state machines, but I'm not seeing any documentation on how I might be able to do this with your library.

I have a state that has one from state and two to states, and based on some logic executed inside that state I need to be able to decide which of the to states to transition to. Is this currently possible?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.