MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / checkAsyncHooks

Function checkAsyncHooks

test/async_progress_queue_worker.js:10–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9let asyncHooks;
10function checkAsyncHooks () {
11 if (nodeVersion >= 8) {
12 if (asyncHooks === undefined) {
13 asyncHooks = require('async_hooks');
14 }
15 return true;
16 }
17 return false;
18}
19
20async function test ({ asyncprogressqueueworker }) {
21 await success(asyncprogressqueueworker);

Calls

no outgoing calls

Tested by

no test coverage detected