MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / compareConstructors

Function compareConstructors

packages/core/src/utils/Utils.ts:21–35  ·  view source on GitHub ↗
(a: any, b: any)

Source from the content-addressed store, hash-verified

19import { Raw, isRaw, type RawQueryFragmentSymbol } from './RawQueryFragment.js';
20
21function compareConstructors(a: any, b: any) {
22 if (a.constructor === b.constructor) {
23 return true;
24 }
25
26 if (!a.constructor) {
27 return b.constructor === Object;
28 }
29
30 if (!b.constructor) {
31 return a.constructor === Object;
32 }
33
34 return false;
35}
36
37/** Deeply compares two objects for equality, handling dates, regexes, and raw fragments. */
38export function compareObjects(a: any, b: any): boolean {

Callers 1

compareObjectsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected