equal-strategies
v0.2.2
Published
Equality evaluation strategies
Downloads
13
Maintainers
Readme
equal-strategies
Equality evaluation strategies.
Install
Usage
Strategies
There are four comparison strategies:
strict(value: any, query: any): boolean
Simple strict equality comparison.
partial(value: any, query: any): boolean
Shallow equality comparison that ignores any missing properties in value
and strict compares arrays.
shallow(value: any, query: any): boolean
Shallow equality comparison.
deep(value: any, query: any): boolean
Deep equality comparison.
Utils
compare(kind: string, value: any, query: any): boolean
A conveniency function, with kind
being either "strict"
, "partial"
, "shallow"
, or "deep"
.