UNPKG

earljs

Version:

Ergonomic, modern and type-safe assertion library

17 lines (16 loc) 682 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isEqual = void 0; const EqualityOptions_1 = require("./EqualityOptions"); const isEqualUnknown_1 = require("./isEqualUnknown"); /** * Extensible equality algorithm used by all functions that check deep equality. * @internal * Not exported itself, but it's exposed through validators. \ * Do not confuse with `isEqual` validator. * @see https://earljs.dev/docs/advanced/equality-algorithm */ function isEqual(value, other, options = EqualityOptions_1.DEFAULT_EQUALITY_OPTIONS) { return (0, isEqualUnknown_1.isEqualUnknown)(value, [], other, [], options); } exports.isEqual = isEqual;