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
# In Reducer | |
state = | |
currentFilters: [ | |
{ | |
by: 'active' | |
filter: (equipmentItem) -> | |
equipmentItem.active | |
} | |
{ | |
by: 'category' |
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
// In Reducer | |
state = | |
currentFilters: [ | |
{ | |
by: 'active', | |
filter: function(equipmentItem){ | |
return equipmentItem.active | |
} | |
}, | |
{ |
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
update : Action -> Model -> Model | |
update action model = | |
case action of | |
Reset -> init 0 0 | |
Top act -> | |
{ model | | |
topCounter = Counter.update act model.topCounter | |
} |
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
# Libraries | |
_ = require 'lodash' | |
# Html is | |
# <body> | |
# <div id = "root" yeee="Dope"> | |
# </div> | |
# </body> | |
stringifyHTML = (el) -> |
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
How long it takes to do each operation a million times in miliseconds | |
Create a Div | |
920.55 | |
Get by ID | |
104.3 | |
Set Attribute | |
307.6 |
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
> String.prototype.toLowerCase = function(){ console.log('DANK!!!!!') } | |
[Function] | |
> DANK!!!!! | |
aDANK!!!!! | |
lDANK!!!!! | |
dDANK!!!!! | |
aDANK!!!!! | |
jDANK!!!!! | |
aDANK!!!!! | |
sDANK!!!!! |
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
# module.coffee | |
module.exports.four = 4 | |
module.exports = -> console.log 'DOPE' | |
# app.coffee | |
ye = require './module' | |
ye() | |
# 'DOPE' |
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
drawLander : Ship -> Element | |
drawLander reasey = | |
let | |
lander = "lander.png" | |
mainThruster = | |
if reasey.thrusters.main == 1 then | |
"blast_main.png" | |
else | |
"blast_main_none.png" | |
in |
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
drawLander : Ship -> Element | |
drawLander reasey = | |
let | |
lander = | |
toForm <| image 138 138 "lander.png" | |
mainThruster = | |
if reasey.thrusters.main == 1 then | |
[ | |
move (0, -32) |
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
// A | |
(function() { | |
var app, main; | |
main = document.getElementById('main'); | |
app = Elm.embed(Elm.main, main); | |
app.ports.ye.subscribe(function(what) { |