MCPcopy Index your code
hub / github.com/prettier/prettier / getGlobalObjects

Function getGlobalObjects

tests/integration/__tests__/bundle.js:199–206  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

197
198 const allowedGlobalObjects = new Set(["prettier", "prettierPlugins"]);
199 const getGlobalObjects = (file) => {
200 const sandbox = createSandBox({ files: [file] });
201 return Object.fromEntries(
202 Object.entries(sandbox).filter(
203 ([property]) => !allowedGlobalObjects.has(property),
204 ),
205 );
206 };
207
208 for (const file of files) {
209 const globalObjects = getGlobalObjects(file);

Callers 1

bundle.jsFile · 0.85

Calls 1

createSandBoxFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…