The first value to compare.
The second value to compare.
Optionalcustomizer: IsEqualCustomizerCallbackThe function to customize comparisons. If undefined, comparisons are handled by z.isEqual. If customizer is passed as a property of the options object, it will be used instead of this argument. You can also pass the options object as the 3rd argument, in place of customizer.
Optionalctx: anyThe this binding (aka context) of customizer. If undefined, this is bound to the global object. If ctx is passed as a property of the options object, it will be used instead of this argument.
OptionalisEqualOptions: IsEqualOptionsThe options object - see above.
The first input value to compare.
The second input value to compare.
OptionalisEqualOptions: IsEqualOptionsThe options object can be the 3rd argument (instead of customizer).
Optionalctx: anyThe this binding (aka context) of customizer. If undefined, this is bound to the global object. If ctx is passed as a property of the options object, it will be used instead of this argument.
Deeply compares 2 input values, returning
trueif they are considered equal, with loads of awesome options!Similar to lodash's
_.isEqual, but:.isEquals()of the values if it exists,likeone-side similarity comparisons,exactrefs required (shallow clones),inheritedorexcludeprops, get thepathof where the difference was found and loads more!See
IisEqualOptions*Map,Set,WeakMap,WeakSet,ArrayBuffer,Error,RegExp,Date,Symbol,BigInt,TypedArray,Promise,class,function,arguments,null,undefined,NaN,realObjectand more.IKeysOptionsto control which keys are compared, asIisEqualOptionsextendsIKeysOptions!props: true, only props matter, not the actual values! *Note: it is NOT 100% compatible to
lodash, mostly for good reasons. Few minor edge cases are not implemented yet asoptions, and current default deemed better and so kept different to lodash. Searchz.isEqual DIFFERENTinsrc/code/objects/isEqual-lodash-spec.ts, where lodash tests are also tested againstz.isEqual, with differences highlighted.Param: a
The first value to compare
Param: b
The second value to compare
Param: customizer
The function to customize comparisons. If
undefined, comparisons are handled byz.isEqual. Ifcustomizeris passed as a property of theoptionsobject, it will be used instead of this argument. You can also pass theoptionsobject as the 3rd argument, in place ofcustomizer.Param: ctx
The
thisbinding (aka context) ofcustomizer. Ifundefined,thisis bound to the global object. Ifctxis passed as a property of theoptionsobject, it will be used instead of this argument.Param: options
The options object - see above. It can also be passed as the 3rd argument, in place of
customizer.Returns
true if the input values are "equal" (based on options),
falseotherwise