This file contains 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
class Env { | |
constructor(p, e = {}) { | |
this.p = p; | |
this.e = e; | |
} | |
get(name) { | |
let val = this.e[name]; | |
if (typeof val !== 'undefined') |
This file contains 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
/* ---------------------------------------------------------------------------- | |
* constants.js | |
* Author: Anthony Del Ciotto | |
* Date: 09/07/2015 | |
* ---------------------------------------------------------------------------- */ | |
module.exports = { | |
ROOT_PATH: require('path').dirname(require.main.filename), | |
DEFAULT_INITIAL_INTERVAL: 50 * (60 * 1000), // 50 mins in ms |
This file contains 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
var START_ASCII_VALUE = 97; | |
/** | |
* isAnagram(a, b) | |
* Returns true if two words are anagrams | |
* i.e: have the exact same letters regardless of order | |
* e.g: silent === listen | |
*/ | |
function isAnagram(a, b) { | |
// firstly check if the two strings have an unequal length |