Skip to content

Instantly share code, notes, and snippets.

@mbildner
Created August 14, 2015 11:54
Show Gist options
  • Save mbildner/50c1a8853af252184ae8 to your computer and use it in GitHub Desktop.
Save mbildner/50c1a8853af252184ae8 to your computer and use it in GitHub Desktop.
'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