node:async_hooks
#Import
import async_hooks from "nstdlib/node/async_hooks";Note
Behaves like Node.js.
#Support
- nstd: Not measured in this environment.
- Browser: Loads with a minimal
processobject. 7 of Node's 7 exports are available. 0 of 1 behavior checks match Node.js. Didn't match: AsyncLocalStorage survives an await (a known difference).
#Exports (7)
Every name Node.js exports from this module, and what you get when you read it, as a named import or as a property of the default import:
- ✅ A value, both ways. An export that throws an error naming the missing feature also counts.
- ⚠️ A value one way,
undefinedthe other. - ❔
undefinedboth ways. - ❌ Not exported at all.
- – Not measured.
| Export | Node.js | Browser |
|---|---|---|
AsyncLocalStorage | ✅ | ✅ |
AsyncResource | ✅ | ✅ |
asyncWrapProviders | ✅ | ✅ |
createHook | ✅ | ✅ |
executionAsyncId | ✅ | ✅ |
executionAsyncResource | ✅ | ✅ |
triggerAsyncId | ✅ | ✅ |
#Diagnostics
nstdlib running inside Node.js. This isn't an environment it's meant for, so it isn't shown above, but it tells a library problem from an environment one:
coverage: 7/7 of the host's export names answer inside host node. Behaviour verified against the host builtin.smoke: Imports in a clean child process.