Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Stent issue #14

node v8.17.0
version: 2.0.0
endpointsharetweet
This is a playground to test JavaScript. It runs a completely standard copy of Node.js on a virtual server created just for you. Every one of npm’s 300,000+ packages are pre-installed, so try it out:
var { Machine } = require("stent"); var stent = Machine.create('actions', { state: { name: 'start', parentAction: 'new' }, transitions: { 'start': { 'take note': 'note', 'create ordine': 'order', 'take party': 'party' }, 'note': { 'take another note': 'note', 'create order': 'order', 'take party': 'party' }, 'party': { 'add participant': { name: 'participant', parentAction: 'new' } }, 'participant': { 'create ordine': 'order', 'add participant': 'participant' } } }) const appMachine = Machine.get('actions'); console.log(appMachine.state.name); console.log(appMachine.state.parentAction); appMachine.takeNote(); console.log(appMachine.state.name); console.log(appMachine.state.parentAction);
Loading…

no comments

    sign in to comment