
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
state-machine
Advanced tools
An expressive, feature-rich, event-driven JavaScript finite-state machine
State Machine is a library for managing a finite set of states, and moving between them via actions and transitions.
From its intuitive configuration through its powerful event-based architecture and rich API, State Machine makes it easy to describe and manage interaction with complex state-dependent systems like components, multi-step forms, purchase funnels, visualisations or games.
State Machine has been designed from the outset to feel intuitive and fun to use:
View the live demo at:
To run / tinker with the demo locally, see the Development section.
State Machine can be used directly in the browser, or in a Browserify, Node or ES6 project.
Install via NPM using:
npm install state-machine
Note: If you are expecting the package wheeyls/stateMachine it has now been depreciated.
To continue to use that package in your project, ensure you use the version 0.3.0
in your package.json
.
View the documentation at:
Clone the repo using:
git clone https://github.com/davestewart/javascript-state-machine
The following NPM tasks are available, via npm run <task>
:
dev
- compile and watch the source to state-machine.js
build
- compile the source to state-machine.min.js
demo
- compile, watch and copy the development build to demo/
and serve demo files at http://localhost:8888
test
- run all testsTo run a single or set of tests, use the following syntax:
npm run test -- --grep="<filename>"
Inspired by @jakesgordon's JavaScript State Machine.
Special thanks to Michael Wheeler (@wheeyls) who very kindly donated the NPM package name state-machine.
FAQs
An expressive, feature-rich, event-driven JavaScript finite-state machine
The npm package state-machine receives a total of 262 weekly downloads. As such, state-machine popularity was classified as not popular.
We found that state-machine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.