COLLECTED BY
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
The Wayback Machine - https://web.archive.org/web/20201220221441/https://github.com/lodash/lodash/blob/master/isMatch.js
Permalink
Cannot retrieve contributors at this time
34 lines (32 sloc)
1.03 KB
import baseIsMatch from './.internal/baseIsMatch.js'
import getMatchData from './.internal/getMatchData.js'
/**
* 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.
*
* @since 3.0.0
* @category Lang
* @param {Object } object The object to inspect.
* @param {Object } source The object of property values to match.
* @returns {boolean } Returns `true` if `object` is a match, else `false`.
* @example
*
* const object = { 'a': 1, 'b': 2 }
*
* isMatch(object, { 'b': 2 })
* // => true
*
* isMatch(object, { 'b': 1 })
* // => false
*/
function isMatch ( object , source ) {
return object === source || baseIsMatch ( object , source , getMatchData ( source ) )
}
export default isMatch
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.