MCPcopy Create free account
hub / github.com/Effect-TS/effect / isDomReference

Function isDomReference

packages/effect/src/internal/equal.ts:53–62  ·  view source on GitHub ↗
(u: object)

Source from the content-addressed store, hash-verified

51 * @internal
52 */
53export const isDomReference = (u: object): boolean => {
54 for (let p = Object.getPrototypeOf(u); p !== null; p = Object.getPrototypeOf(p)) {
55 if (
56 (Object.hasOwn(p, "DOCUMENT_NODE") && Object.hasOwn(p, "nodeType")) ||
57 Object.getOwnPropertyDescriptor(p, Symbol.toStringTag)?.value === "AbstractRange" ||
58 (Object.hasOwn(p, "compareBoundaryPoints") && Object.hasOwn(p, "startOffset"))
59 ) return true
60 }
61 return false
62}
63
64/** @internal */
65export const objectKind = (u: object): number =>

Callers 2

compareStructureFunction · 0.90
hashFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected