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.15arrow_drop_down
v4.17.15
v4.17.11
STATUS
Passing
DOWNLOADS
192
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
4 months ago
SIZE
N/A
Performs a partial deep comparison between `object` and `source` to
2 contributors
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
const 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`.