Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
CommonJS: Module instances of global objects share prototypes?
var myString1 = require('commonjs_mod').myString;
var myString2 = "app";; // no Fail. This string is an instance of a String whose prototype has a `foo` method; // Fail. This string is an instance of the global String native = function(){ return "foo'd"; };
exports.myString = "mod";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.