MCPcopy Create free account
hub / github.com/middleapi/orpc / isObject

Function isObject

packages/shared/src/object.ts:44–52  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

42 * Check if the value is an object even it created by `Object.create(null)` or more tricky way.
43 */
44export function isObject(value: unknown): value is Record<PropertyKey, unknown> {
45 if (!value || typeof value !== 'object') {
46 return false
47 }
48
49 const proto = Object.getPrototypeOf(value)
50
51 return proto === Object.prototype || !proto || !proto.constructor
52}
53
54/**
55 * Check if the value satisfy a `object` type in typescript

Callers 15

isORPCErrorJsonFunction · 0.90
serializeMethod · 0.90
constructorMethod · 0.90
parseBatchResponseFunction · 0.90
unrefDeepFunction · 0.90
toOpenAPIContentFunction · 0.90
isFileSchemaFunction · 0.90
isObjectSchemaFunction · 0.90
separateObjectSchemaFunction · 0.90
filterSchemaBranchesFunction · 0.90
decodeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected