The first value to compare.
The second value to compare.
Optional
customizer: 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
.
Optional
ctx: 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.
Optional
isEqualOptions: IsEqualOptionsThe options object - see above.
The first input value to compare.
The second input value to compare.
Optional
isEqualOptions: IsEqualOptionsThe options
object can be the 3rd argument (instead of customizer
).
Optional
ctx: 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
true
if they are considered equal, with loads of awesome options!Similar to lodash's
_.isEqual
, but:.isEquals()
of the values if it exists,like
one-side similarity comparisons,exact
refs required (shallow clones),inherited
orexclude
props, get thepath
of 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
,realObject
and more.IKeysOptions
to control which keys are compared, asIisEqualOptions
extendsIKeysOptions
!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 DIFFERENT
insrc/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
. Ifcustomizer
is passed as a property of theoptions
object, it will be used instead of this argument. You can also pass theoptions
object as the 3rd argument, in place ofcustomizer
.Param: ctx
The
this
binding (aka context) ofcustomizer
. Ifundefined
,this
is bound to the global object. Ifctx
is passed as a property of theoptions
object, 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),
false
otherwise