Skip to content

Instantly share code, notes, and snippets.

@brigand
Created May 21, 2014 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brigand/c437e49f6d7bbad8352c to your computer and use it in GitHub Desktop.
Save brigand/c437e49f6d7bbad8352c to your computer and use it in GitHub Desktop.
var x = require("./fnord");
module.exports = function foo() {
console.log(x(1, 2));
};
module.exports = function (a, b) {
return a + b;
};
var x = require("./fnord"),
y = require.resolve("./fnord"),
z = require.cache[y].exports;
require.cache[y].exports = function (a, b) {
console.log("got", a, b);
return z(a, b);
};
var t = require("./dronf");
t();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment