-
-
Save vdeturckheim/6cfaeb8ab6238a7144d20b1623a0d0f7 to your computer and use it in GitHub Desktop.
This file contains 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
const getContext = function (asyncId = AsyncHooks.executionAsyncId()) { | |
// this returns the context linked to a given asynchronous id, by default, current asynchronous id is used. | |
return context.get(asyncId); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment