1 var baseConformsTo = require('./_baseConformsTo'),
2 keys = require('./keys');
5 * Checks if `object` conforms to `source` by invoking the predicate
6 * properties of `source` with the corresponding property values of `object`.
8 * **Note:** This method is equivalent to `_.conforms` when `source` is
15 * @param {Object} object The object to inspect.
16 * @param {Object} source The object of property predicates to conform to.
17 * @returns {boolean} Returns `true` if `object` conforms, else `false`.
20 * var object = { 'a': 1, 'b': 2 };
22 * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
25 * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
28 function conformsTo(object, source) {
29 return source == null || baseConformsTo(object, source, keys(source));
32 module.exports = conformsTo;