Skip to content

Instantly share code, notes, and snippets.

@elarkin
Created June 13, 2011 21:00
Show Gist options
  • Save elarkin/1023684 to your computer and use it in GitHub Desktop.
Save elarkin/1023684 to your computer and use it in GitHub Desktop.
require.async
require.async = function require_async(module, continuation) {
//quick! pretend to be async!
continuation(require(module));
//alternately, actually be async:
//process.nextTick(function() {
// continuation(require(module));
//});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment