Skip to content

Instantly share code, notes, and snippets.

@Zenwolf
Zenwolf / machine.js
Created January 7, 2020 22:17
Generated by XState Viz: https://xstate.js.org/viz
Machine({
"id": "playback",
"initial": "idle",
"context": {
contentPreviewPin: undefined,
pinExpired: true
},
"states": {
failure: { type: 'final' },
@Zenwolf
Zenwolf / machine.js
Last active December 11, 2019 16:37
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@Zenwolf
Zenwolf / machine.js
Last active December 10, 2019 01:04
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@Zenwolf
Zenwolf / machine.js
Last active December 9, 2019 21:03
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@Zenwolf
Zenwolf / machine.js
Last active November 20, 2019 17:03
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Zenwolf
Zenwolf / SketchSystems.spec
Last active July 3, 2018 20:53
initializing*
initializing*
ready -> paused
paused
close -> closed
play -> playing
timeout -> timedout
error -> error
waiting*
@Zenwolf
Zenwolf / model-serialization.js
Last active December 18, 2015 21:29
Example of Model serialization and deserialization from JSON.
/*
* Model constructor.
* Accepts config:
* config.type {String}
* config.data {Object}
*/
function Model(config) {
this.type = config.type;
this.data = config.data;
}