MCPcopy
hub / github.com/di-sukharev/opencommit / initCtorRegistry

Function initCtorRegistry

out/cli.cjs:2726–2746  ·  view source on GitHub ↗
(globalObject)

Source from the content-addressed store, hash-verified

2724 var AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {
2725 }).prototype);
2726 function initCtorRegistry(globalObject) {
2727 if (hasOwn3(globalObject, ctorRegistrySymbol)) {
2728 return globalObject[ctorRegistrySymbol];
2729 }
2730 const ctorRegistry = /* @__PURE__ */ Object.create(null);
2731 ctorRegistry["%Object.prototype%"] = globalObject.Object.prototype;
2732 ctorRegistry["%IteratorPrototype%"] = Object.getPrototypeOf(
2733 Object.getPrototypeOf(new globalObject.Array()[Symbol.iterator]())
2734 );
2735 try {
2736 ctorRegistry["%AsyncIteratorPrototype%"] = Object.getPrototypeOf(
2737 Object.getPrototypeOf(
2738 globalObject.eval("(async function* () {})").prototype
2739 )
2740 );
2741 } catch {
2742 ctorRegistry["%AsyncIteratorPrototype%"] = AsyncIteratorPrototype;
2743 }
2744 globalObject[ctorRegistrySymbol] = ctorRegistry;
2745 return ctorRegistry;
2746 }
2747 function getSameObject(wrapper, prop, creator) {
2748 if (!wrapper[sameObjectCaches]) {
2749 wrapper[sameObjectCaches] = /* @__PURE__ */ Object.create(null);

Callers 1

newObjectInRealmFunction · 0.85

Calls 1

createMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…