node:async_hooks

#Import

import async_hooks from "nstdlib/node/async_hooks";

Note

Behaves like Node.js.

#Support

node:async_hooks. nstd: not measured. Browser: some support; export coverage 100%.

  • nstd: Not measured in this environment.
  • Browser: Loads with a minimal process object. 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, undefined the other.
  • ❔ undefined both ways.
  • ❌ Not exported at all.
  • – Not measured.
ExportNode.jsBrowser
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.