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

Function getInternalGlobal

lib/internal/util.js:724–731  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

722
723let internalGlobal;
724function getInternalGlobal() {
725 if (internalGlobal == null) {
726 // Lazy-load to avoid a circular dependency.
727 const { runInNewContext } = require('vm');
728 internalGlobal = runInNewContext('this', undefined, { contextName: 'internal' });
729 }
730 return internalGlobal;
731}
732
733function SideEffectFreeRegExpPrototypeExec(regex, string) {
734 const { RegExp: RegExpFromAnotherRealm } = getInternalGlobal();

Callers 2

getCrossRealmRegexFunction · 0.85

Calls 2

runInNewContextFunction · 0.85
requireFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…