1 var baseClone = require('./_baseClone'),
2 baseConforms = require('./_baseConforms');
5 * Creates a function that invokes the predicate properties of `source` with
6 * the corresponding property values of a given object, returning `true` if
7 * all predicates return truthy, else `false`.
9 * **Note:** The created function is equivalent to `_.conformsTo` with
10 * `source` partially applied.
16 * @param {Object} source The object of property predicates to conform to.
17 * @returns {Function} Returns the new spec function.
25 * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
26 * // => [{ 'a': 1, 'b': 2 }]
28 function conforms(source) {
29 return baseConforms(baseClone(source, true));
32 module.exports = conforms;