Checks if object conforms to source by invoking the predicate properties of source with the corresponding property values of object.
object
source
Note: This method is equivalent to conforms when source is partially applied.
conforms
The object to inspect.
The object of property predicates to conform to.
Returns true if object conforms, else false.
true
false
5.12.0
const object = { 'a': 1, 'b': 2 }conformsTo(object, { 'b': function(n) { return n > 1 } })// => trueconformsTo(object, { 'b': function(n) { return n > 2 } })// => false Copy
const object = { 'a': 1, 'b': 2 }conformsTo(object, { 'b': function(n) { return n > 1 } })// => trueconformsTo(object, { 'b': function(n) { return n > 2 } })// => false
Checks if
object
conforms tosource
by invoking the predicate properties ofsource
with the corresponding property values ofobject
.Note: This method is equivalent to
conforms
whensource
is partially applied.