Skip to content

Instantly share code, notes, and snippets.

View Swivelgames's full-sized avatar

Joseph Dalrymple Swivelgames

View GitHub Profile
@Swivelgames
Swivelgames / ReferencableString.js
Last active August 29, 2015 14:04
Messing around with things and trying to find a good way to make a string reference-able...
var StringReference = function(scope, str) {
if(str===void 0) { str = scope; scope = window; };
Object.defineProperty(scope, "__"+str, {
configurable: true,
enumerable: false,
get: function(){
return scope[str];
},
set: function(val){