Skip to content

Instantly share code, notes, and snippets.

@LucienLee
Created May 20, 2013 11:38
Show Gist options
  • Save LucienLee/5611753 to your computer and use it in GitHub Desktop.
Save LucienLee/5611753 to your computer and use it in GitHub Desktop.
var data = "exports = module.exports = {
room1: 'public',
room2: 'public',
room3: 'public'
};"
var f = new Function('var module={},exports=null;\n'+data+'\nif(typeof module.exports !== "undefined") {\nreturn module.exports;\n}\nif(null != exports) {\n return exports;\n}');
var exports = f();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment