MCPcopy Create free account
hub / github.com/nodejs/node / wrapScriptInUrlWorker

Function wrapScriptInUrlWorker

test/es-module/test-esm-import-meta-main-eval.mjs:17–22  ·  view source on GitHub ↗
(script)

Source from the content-addressed store, hash-verified

15}
16
17function wrapScriptInUrlWorker(script) {
18 return `
19 import { Worker } from 'node:worker_threads';
20 new Worker(new URL(${JSON.stringify(convertScriptSourceToDataUrl(script))}));
21 `;
22}
23
24const onlyWithAmaro = { skip: !process.config.variables.node_use_amaro };
25

Calls 1

Tested by

no test coverage detected