Skip to content

Instantly share code, notes, and snippets.

@devongovett
Created October 12, 2012 18:10
Show Gist options
  • Select an option

  • Save devongovett/3880609 to your computer and use it in GitHub Desktop.

Select an option

Save devongovett/3880609 to your computer and use it in GitHub Desktop.
AV.loadModule = function() {
var Module = require('module');
var contextLoad = Module._contextLoad;
Module._contextLoad = true;
var AV = global.AV;
global.AV = require('av');
var ret = require.apply(null, arguments);
Module._contextLoad = contextLoad;
global.AV = AV;
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment