Creates a function that performs a partial deep comparison between a given object and shape, returning true if the given object has equivalent property values, else false.
shape
true
false
let objects = [ { a: 1, b: 2, c: 3 }, { a: 4, b: 5, c: 6 }]filter(objects, matches({ a: 4, c: 6 }))// [{ a: 4, b: 5, c: 6 }]
Generated using TypeDoc
Creates a function that performs a partial deep comparison between a given object and
shape
, returningtrue
if the given object has equivalent property values, elsefalse
.Example
Returns