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/20201220220407/https://github.com/lodash/lodash/blob/master/conforms.js
Permalink
Cannot retrieve contributors at this time
33 lines (30 sloc)
958 Bytes
import baseClone from './.internal/baseClone.js'
import baseConforms from './.internal/baseConforms.js'
/** Used to compose bitmasks for cloning. */
const CLONE_DEEP_FLAG = 1
/**
* Creates a function that invokes the predicate properties of `source` with
* the corresponding property values of a given object, returning `true` if
* all predicates return truthy, else `false`.
*
* **Note:** The created function is equivalent to `conformsTo` with
* `source` partially applied.
*
* @since 4.0.0
* @category Util
* @param {Object } source The object of property predicates to conform to.
* @returns {Function } Returns the new spec function.
* @example
*
* const objects = [
* { 'a': 2, 'b': 1 },
* { 'a': 1, 'b': 2 }
* ]
*
* filter(objects, conforms({ 'b': function(n) { return n > 1 } }))
* // => [{ 'a': 1, 'b': 2 }]
*/
function conforms ( source ) {
return baseConforms ( baseClone ( source , CLONE_DEEP_FLAG ) )
}
export default conforms
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.