Created
June 13, 2011 21:00
-
-
Save elarkin/1023684 to your computer and use it in GitHub Desktop.
require.async
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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