Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

is-match

v4.17.11arrow_drop_down
v4.17.11
STATUS
Passing
DOWNLOADS
70
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 months ago
SIZE
6 KB
subject
Performs a partial deep comparison between `object` and `source` to
1 contributor
Use is-match in your project ?
Copied
npm i @bit/lodash.lodash.is-match
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
revert changes
reload
toggle layout
maximize
isMatch(object, {
  b: 2
});
modifieddraft
chevron_left
chevron_right
isMatch (
object:Object,
source:Object
) : boolean

Performs a partial deep comparison between object and source to determine if object contains equivalent property values.

Note: This method is equivalent to _.matches when source is partially applied.

Partial comparisons will match empty array and empty object source values against any array or object value, respectively. See _.isEqual for a list of supported value comparisons.

Example
var object = { 'a': 1, 'b': 2 };

_.isMatch(object, { 'b': 2 });
// => true

_.isMatch(object, { 'b': 1 });
// => false
Arguments
object: Object

The object to inspect.

source: Object

The object of property values to match.

Returns
boolean

Returns `true` if `object` is a match, else `false`.