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
import OAuth from 'oauth-1.0a'; | |
import CryptoJS from 'crypto-js'; | |
/** | |
* oAuthHeader - Get Authentication header with OAuth. | |
* | |
* @param {string} url Request URL | |
* @param {string} method HTTP method. | |
* @return {object} Authentication header object | |
*/ |
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 getWatchers(root) { | |
root = angular.element(root || document.documentElement); | |
var watcherCount = 0; | |
function getElemWatchers(element) { | |
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope); | |
var scopeWatchers = getWatchersFromScope(element.data().$scope); | |
var watchers = scopeWatchers.concat(isolateWatchers); | |
angular.forEach(element.children(), function (childElement) { | |
watchers = watchers.concat(getElemWatchers(angular.element(childElement))); |
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
// Notes from funfunfunction videos | |
/* | |
Functional programming | |
According to the video FP should improve your code, less time and more understandable, in javascript functions are values | |
*/ | |
// functions can be assigned to variables | |
var triple = function (x) { | |
return x * 3; | |
} | |
var waffle = triple; |
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
// mutators | |
// push , pop, shift, unshift | |
var array = []; | |
/ | |
function memoria(limit) { | |
var array = []; | |
return function (element) { | |
var isSet = arguments.length >= 1; | |
if (isSet) { | |
array.push(element) |
OlderNewer