Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
A Javascript state machine with a simple API. Well tested, and typed with Flowtype. MIT License.
A Javascript state machine with a simple API. Well tested, and typed with Flowtype. MIT license.
Specify finite state machines with a brief syntax. Run them. Derive charts from them. Save and load states. Make factories. Impress friends and loved ones. Cure corns and callouses.
const traffic_light = new jssm.machine({
initial_state : 'Red',
transitions : [
{ action: 'Proceed', from:'Green', to:'Yellow' },
{ action: 'Proceed', from:'Yellow', to:'Red' },
{ action: 'Proceed', from:'Red', to:'Green' }
]
});
// use with actions
traffic_light.state(); // 'Red'
traffic_light.action('Proceed'); // true
traffic_light.state(); // 'Green'
traffic_light.action('Proceed'); // true
traffic_light.state(); // 'Yellow'
traffic_light.action('Proceed'); // true
traffic_light.state(); // 'Red'
// use with transitions
traffic_light.transition('Yellow'); // false (lights can't go from red to yellow, only to green)
traffic_light.state(); // 'Red'
traffic_light.transition('Red'); // false (lights can't go from red to red, either)
traffic_light.state(); // 'Red'
traffic_light.transition('Green'); // true
traffic_light.state(); // 'Green'
Which you can see being hand-executed in the console here:
There are a lot of state machine impls for JS, many quite a bit more mature than this one. Here are some options:
And some similar stuff:
FAQs
A Javascript finite state machine (FSM) with a terse DSL and a simple API. Most FSMs are one-liners. Fast, easy, powerful, well tested, typed with TypeScript, and visualizations. MIT License.
We found that jssm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.