MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / hidePrivateProperties

Function hidePrivateProperties

src/common/utils.ts:78–89  ·  view source on GitHub ↗
(obj: any)

Source from the content-addressed store, hash-verified

76}
77
78export function hidePrivateProperties(obj: any) {
79 for (const key in obj) {
80 if (key.startsWith('_') && obj.hasOwnProperty(key)) {
81 Object.defineProperty(obj, key, {
82 enumerable: false,
83 configurable: true, // Allows redefinition if necessary
84 writable: true, // Allows modification
85 value: obj[key],
86 });
87 }
88 }
89}

Callers 1

constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected