We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maybe do some basic "shim" that loads the module and call a callback on the process.nextTick:
process.nextTick
function __asyncRequire(deps, cb){ process.nextTick( function(){ cb.apply(this, deps.map(require)); } ); }
easy to implement and should work for most cases.
PS: maybe we don't even need to check for name collisions, __asyncRequire shouldn't be that common (YAGNI).
__asyncRequire
The text was updated successfully, but these errors were encountered:
No branches or pull requests
maybe do some basic "shim" that loads the module and call a callback on the
process.nextTick
:easy to implement and should work for most cases.
PS: maybe we don't even need to check for name collisions,
__asyncRequire
shouldn't be that common (YAGNI).The text was updated successfully, but these errors were encountered: