Skip to content

Instantly share code, notes, and snippets.

View She-Codes's full-sized avatar

Nikia Shaw She-Codes

View GitHub Profile
@She-Codes
She-Codes / machine.js
Last active October 2, 2020 15:05
Generated by XState Viz: https://xstate.js.org/viz
const formMachine = Machine({
id: 'form',
initial: 'editing',
context: {
startDate: undefined,
returnDate: undefined,
},
states: {
editing: {
initial: 'oneWayFlight',
@She-Codes
She-Codes / machine.js
Last active September 3, 2020 17:55
Generated by XState Viz: https://xstate.js.org/viz
const rtsLoaded = true;
const config = {
id: 'rts',
initial: rtsLoaded ? 'requested' : 'idle',
context: {
rtsId: null,
memberKey: null,
instance: 'instance',
},
@She-Codes
She-Codes / machine.js
Last active April 3, 2020 13:18
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@She-Codes
She-Codes / machine.js
Created March 23, 2020 21:18
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@She-Codes
She-Codes / librarySystem_with_dependencies.js
Created December 27, 2016 13:27
Watch and Code librarySystem with dependencies
(function() {
var libraryStorage = {};
function librarySystem(library, dependencyArray, callback) {
var libraries = [];
if ( arguments.length > 1 ) {
// go through dependencyArray and get the actual libraries
dependencyArray.forEach(function(dependency) {
libraries.push(libraryStorage[dependency]);
});
@She-Codes
She-Codes / Full-screen slider (JS) with custom effects.markdown
Created August 5, 2015 04:12
Full-screen slider (JS) with custom effects
@She-Codes
She-Codes / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console