MCPcopy Index your code
hub / github.com/nodejs/node / createSyntheticModule

Function createSyntheticModule

test/es-module/test-vm-synthetic-module-leak.js:10–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const vm = require('vm');
9
10async function createSyntheticModule() {
11 const m = new vm.SyntheticModule(['bar'], () => {
12 m.setExport('bar', new Array(512).fill('----'));
13 });
14 await m.link(() => {});
15 await m.evaluate();
16 return m;
17}
18checkIfCollectable(createSyntheticModule, 4096);

Callers

nothing calls this directly

Calls 4

setExportMethod · 0.95
linkMethod · 0.95
fillMethod · 0.80
evaluateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…