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
188
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
A year ago
SIZE
6 KB
Performs a partial deep comparison between `object` and `source` to
1 contributor
Install is-match as a package?
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
React Native
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';
toggle layout
var object = {
  a: 1,
  b: 2,
};
  b: 2,
}); // => true
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`.