If I create a Node.js module "augs" that contains
Object.foo = "bar";
Then type in the REPL
require("./augs");
typeof Object.foo
I get back 'undefined'.
We have a significant amount of code in our web app that relies on convenience methods added to Object, Function, Date, etc. We're trying to share some code between the frontend and the backend, but it seems like Node resets these constructor functions, or somehow otherwise prevents changes to them in a given module from leaking into other modules. While this is pretty smart and I appreciate the level of protection, is there some way to say "I know what I'm doing; please let me augment Object"?