Created
August 14, 2015 11:54
-
-
Save mbildner/50c1a8853af252184ae8 to your computer and use it in GitHub Desktop.
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
'use strict'; | |
module.exports = function(global){ | |
function set (key, val) { | |
var valFunc = (typeof val === 'function' ? val : function () { return val; }).bind(global); | |
global.__defineGetter__(key, valFunc); | |
} | |
function SET (key, val) { | |
global[key] = val; | |
} | |
return { | |
set: set, | |
SET: SET | |
}; | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment