This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "presets": [ | |
| ["es2015", { "modules": false }] | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // with systemJS, you can import any npm module | |
| // directly in the browser and use it as you see fit. | |
| // just prepend the module name with 'npm:' | |
| import { sum, kebabCase } from 'npm:lodash' | |
| import { addTax } from './checkout'; | |
| const amount = 1500; | |
| const myName = 'Androide Osorio'; | |
| console.log('Hi, my name is'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * ES2015 Generators | |
| */ | |
| // think of ES2015 generators as a new kind of function, | |
| // which may be paused in the middle, one or many times, | |
| // and resumed later, allowing other code to run during these | |
| // periods of pause, and be passed different information | |
| // each time it is started or paused, and respond accordingly | |
| // to create a generator function, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Proxies | |
| */ | |
| /* | |
| * Proxies allow to override the default behavior | |
| * from an object's default operations. | |
| * | |
| * Proxies enable creation of objects with the full range of behaviors available to host objects. | |
| * Can be used for interception, object virtualization, logging/profiling, etc. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Null events and transient transitions | |
| ----------------------------------------------- | |
| It is often useful to identify conditional branching in your machine as a state itself. A state that is designed to determine the next state does not need a specific event sent to trigger the transition. Instead, we can use the "null event" to trigger an immediate, transient transition. | |
| The null event is identified with an event name of an empty string '', and is immediately sent to the state upon entry. We can setup multiple targets with conditionals, or fire off actions to set up a future state with this transient transitions. | |
| */ | |
| const ifAtFirstyouDontSuceed = Machine({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
OlderNewer