const y = le => (f => f(f))(f => le(x => f(f)(x)))
'use strict'
const fib = (n, a = 1, b = 0) => n ? fib(n - 1, a + b, a) : b
/** | |
* Create an new deferred promise that can be resolved/rejected from outside. | |
* @return {Promise} A new Promise with two extra methods: resolve and reject. | |
* | |
* @example | |
* const unknownResult = () => { | |
* const deferredPromise = defer() | |
* | |
* const errorTimeoutId = setTimeout( | |
* () => { |
/** | |
* @file one-liner functional utilities in JavaScript | |
* @author Stefan Maric <[email protected]> | |
* @license | |
* Copyright © 2017 Stefan Maric <[email protected]> | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
*/ |
/** | |
* Gets the value at route of object. | |
* Look at: https://lodash.com/docs/4.17.4#get | |
* | |
* @param {Array|string} route The path of the property to get. | |
* @param {Object} obj The object to query. | |
* @return {*} Resolved value, or undefined. | |
*/ | |
function path (route, obj) { | |
if (!Array.isArray(route)) return path(route.split('.'), obj) |
'use strict' | |
function flatten (source, dest, separator, path) { | |
dest = typeof dest !== 'undefined' ? dest : {} | |
separator = typeof separator !== 'undefined' ? separator : '-' | |
path = typeof path !== 'undefined' ? path : [] | |
for (var key in source) { | |
if (!source.hasOwnProperty(key)) continue |
function deepDiffRight (left, right) { | |
// if they are equals, return undefined | |
if (angular.equals(left, right)) return | |
// form now on, we can assure that `left` and `right` are not equals (equivalents) | |
// if `left` and `right` are primitives, value changed | |
// if `left` is a primitive and `right` an object, value has been replaced with an object | |
// if `left` is an object and `right` a primitive, value has been replaced with a primitive | |
// use `_.copy` to prevent object referrence issues | |
if (!angular.isObject(left) || !angular.isObject(right)) return angular.copy(right) |
/* Open Sans - by Steve Matteson, Apache License version 2.0 */ | |
/* Open Sans Light */ | |
@font-face { | |
font-family: 'Open Sans'; | |
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAF5IABMAAAAArgwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABqAAAABwAAAAca7DAFEdERUYAAAHEAAAAHQAAAB4AJwDwR1BPUwAAAeQAAASiAAAJmCwaFlhHU1VCAAAGiAAAAIEAAACooF6Ikk9TLzIAAAcMAAAAXgAAAGCgeJYXY21hcAAAB2wAAAGGAAAB2s9AWKBjdnQgAAAI9AAAADgAAAA4ClINZmZwZ20AAAksAAABsQAAAmVTtC+nZ2FzcAAACuAAAAAIAAAACAAAABBnbHlmAAAK6AAASiYAAI54OERAeGhlYWQAAFUQAAAAMwAAADYJcp/SaGhlYQAAVUQAAAAfAAAAJA9bBixobXR4AABVZAAAAjEAAAOmuKtcmWxvY2EAAFeYAAABzgAAAdZKMihUbWF4cAAAWWgAAAAgAAAAIAIHAc1uYW1lAABZiAAAAhoAAATiYqqsfHBvc3QAAFukAAAB6wAAAt17wozucHJlcAAAXZAAAACvAAABLyQjUqh3ZWJmAABeQAAAAAYAAAAG7WNVfgAAAAEAAAAA0MoNVwAAAADJQhTbAAAAANGkneF42mNgZGBg4AFiMSBmYmAEwpdAzALmMQAADaEBGAAAAHjarZZLbFRVGMf/M51hxoKWqtH4CBoyNrUGjQ1J27GwatpaDZZpi4MOig/iAkJCY0hMExaFgbgwIQYrOTxqCkyh0FmQUpryMkxXLNzhaW3jyuVJV8QFIY6/c9sp4EjVxHz55dw597vf43/OPXMVklSpbn2qSEvru916/rOvenep5oveHTtVv+uTL3dro |
function areEquivalents (a, b) { | |
if (a && b && typeof a === 'object' && typeof a === typeof b && a.length === b.length) { | |
for (var prop in a) { | |
if (a.hasOwnProperty(prop) && !areEquivalents(a[prop], b[prop])) { | |
return false | |
} | |
} | |
for (var prop in b) { | |
if (b.hasOwnProperty(prop) && !areEquivalents(b[prop], a[prop])) { | |
return false |