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

Function prototypesEqual

assert/equal.ts:9–15  ·  view source on GitHub ↗
(a: object, b: object)

Source from the content-addressed store, hash-verified

7}
8
9function prototypesEqual(a: object, b: object) {
10 const pa = Object.getPrototypeOf(a);
11 const pb = Object.getPrototypeOf(b);
12 return pa === pb ||
13 pa === Object.prototype && pb === null ||
14 pa === null && pb === Object.prototype;
15}
16
17function isBasicObjectOrArray(obj: object) {
18 const proto = Object.getPrototypeOf(obj);

Callers 1

equalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected