By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document) | |
Node.prototype.on = window.on = function (name, delegate, fn) { | |
var f | |
var target = this, match = false | |
var matches = this.matchesSelector || this.mozMatchesSelector || this.webkitMatchesSelector || this.oMatchesSelector || (function (name) { | |
$(name).forEach(function (elm) { | |
if (elm === target){ |
"use strict"; | |
var gui = require("nw.gui"); | |
var AppShortcut = require("./appshortcut")(gui).AppShortcut; | |
var keycode = require('keycode'); | |
var win = gui.Window.get(); | |
if (process.platform === "darwin") { | |
var nativeMenuBar = new gui.Menu({type: "menubar"}); |
function makeImageZoomable(panImg) { | |
if (typeof panImg == 'string') | |
panImg = document.getElementById(panImg); | |
var panImgContainer = panImg.parentNode; | |
var startScale; | |
var currentScale = 1; | |
var startX = 0; | |
var startY = 0; | |
var currentX = 0; |
The MIT License (MIT) | |
Copyright (c) 2014 Tomas Kafka | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
document.addEventListener('dragover', function(e){ | |
e.preventDefault(); | |
e.stopPropagation(); | |
}, false); | |
document.addEventListener('drop', function(e){ | |
e.preventDefault(); | |
e.stopPropagation(); | |
}, false) |
mochaAppium: | |
options: | |
usePromises: true | |
# Mocha options | |
reporter: 'spec' | |
timeout: 30e3 | |
slow: 10e3 | |
iphone: | |
src: ['www/spec/functional/sanity.js'] |
function isTouchDevice(){ | |
try{ | |
document.createEvent("TouchEvent"); | |
return true; | |
}catch(e){ | |
return false; | |
} | |
} |