MCPcopy Create free account
hub / github.com/denoland/std / isBasicObjectOrArray

Function isBasicObjectOrArray

assert/equal.ts:17–21  ·  view source on GitHub ↗
(obj: object)

Source from the content-addressed store, hash-verified

15}
16
17function isBasicObjectOrArray(obj: object) {
18 const proto = Object.getPrototypeOf(obj);
19 return proto === null || proto === Object.prototype ||
20 proto === Array.prototype;
21}
22
23// Slightly faster than Reflect.ownKeys in V8 as of 12.9.202.13-rusty (2024-10-28)
24function ownKeys(obj: object) {

Callers 1

equalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected