MCPcopy Create free account
hub / github.com/arktypeio/arktype / isPlainObjectOrArray

Function isPlainObjectOrArray

ark/util/objectKinds.ts:421–424  ·  view source on GitHub ↗
(o: object)

Source from the content-addressed store, hash-verified

419
420/** whether an object is an array, or has the prototype of a literal or none */
421export const isPlainObjectOrArray = (o: object): boolean => {
422 const proto = Object.getPrototypeOf(o)
423 return proto === Object.prototype || proto === null || Array.isArray(o)
424}
425
426/** JSON Schema's object type, which excludes arrays and functions */
427export const isNonArray = (data: object): boolean =>

Callers 1

validateAmbientConfigFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected