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
| // ES6 compose | |
| const compose = (...funcs) => | |
| x => funcs.reduceRight((acc, func) => func(acc), x); | |
| // ES5 equivelant | |
| var compose = function(){ | |
| var args = Array.prototype.slice.call(arguments); | |
| return function(val){ | |
| return args.reduceRight(function(memo, fn){ |
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
| const Cycle = require('@cycle/core'); | |
| const {makeDOMDriver, div, button} = require('@cycle/dom'); | |
| const _ = require('lodash'); | |
| const {Observable} = require('rx'); | |
| const {restartable} = require('cycle-restart'); | |
| function main ({DOM}) { | |
| const add$ = DOM | |
| .select('.add') |
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
| const Cycle = require('@cycle/core'); | |
| const {makeDOMDriver, div, button} = require('@cycle/dom'); | |
| const _ = require('lodash'); | |
| const {Observable} = require('rx'); | |
| const {restartable} = require('cycle-restart'); | |
| function main ({DOM}) { | |
| const add$ = DOM | |
| .select('.add') |
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
| const Cycle = require('@cycle/core'); | |
| const {makeDOMDriver, div, button} = require('@cycle/dom'); | |
| const _ = require('lodash'); | |
| const {Observable} = require('rx'); | |
| const {restartable} = require('cycle-restart'); | |
| function main ({DOM}) { | |
| const add$ = DOM | |
| .select('.add') |
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
| const Cycle = require('@cycle/core'); | |
| const {makeDOMDriver, div, button} = require('@cycle/dom'); | |
| const _ = require('lodash'); | |
| const {Observable} = require('rx'); | |
| const {restartable} = require('cycle-restart'); | |
| function main ({DOM}) { | |
| const add$ = DOM | |
| .select('.add') |
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
| const Cycle = require('@cycle/core'); | |
| const {makeDOMDriver, div, button} = require('@cycle/dom'); | |
| const _ = require('lodash'); | |
| const {Observable} = require('rx'); | |
| const {restartable} = require('cycle-restart'); | |
| function main ({DOM}) { | |
| const add$ = DOM | |
| .select('.add') |
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
| my name is griffin |
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
| const Cycle = require('@cycle/core'); | |
| const {makeDOMDriver, div, button} = require('@cycle/dom'); | |
| const _ = require('lodash'); | |
| const {Observable} = require('rx'); | |
| const {restartable} = require('cycle-restart'); | |
| // This looks a little different than normal. It's to enable support for cycle-restart, | |
| // which automatically plays back your actions when the code reloads. |
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
| const Cycle = require('@cycle/core'); | |
| const {makeDOMDriver, div, button} = require('@cycle/dom'); | |
| const _ = require('lodash'); | |
| const {Observable} = require('rx'); | |
| const {restartable} = require('cycle-restart'); | |
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
| function griffin() { | |
| return 'stuff' | |
| } |