MCPcopy
hub / github.com/facebook/react / objectName

Function objectName

packages/shared/ReactSerializationErrors.js:92–97  ·  view source on GitHub ↗
(object: mixed)

Source from the content-addressed store, hash-verified

90}
91
92export function objectName(object: mixed): string {
93 // $FlowFixMe[method-unbinding]
94 const name = Object.prototype.toString.call(object);
95 // Extract 'Object' from '[object Object]':
96 return name.slice(8, name.length - 1);
97}
98
99function describeKeyForErrorMessage(key: string): string {
100 const encodedKey = JSON.stringify(key);

Callers 5

resolveToJSONFunction · 0.90
createTaskFunction · 0.90
renderModelDestructiveFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected