Bump to v4.14.0.

This commit is contained in:
John-David Dalton
2016-07-24 09:52:33 -07:00
parent 295d8cf415
commit a8d3718760
253 changed files with 2469 additions and 1808 deletions

30
conformsTo.js Normal file
View File

@@ -0,0 +1,30 @@
var baseConformsTo = require('./_baseConformsTo'),
keys = require('./keys');
/**
* Checks if `object` conforms to `source` by invoking the predicate properties
* of `source` with the corresponding property values of `object`. This method
* is equivalent to a `_.conforms` function when `source` is partially applied.
*
* @static
* @memberOf _
* @since 4.14.0
* @category Lang
* @param {Object} object The object to inspect.
* @param {Object} source The object of property predicates to conform to.
* @returns {boolean} Returns `true` if `object` conforms, else `false`.
* @example
*
* var object = { 'a': 1, 'b': 2 };
*
* _.conformsTo(object, { 'b': function(n) { return n > 1; } });
* // => true
*
* _.conformsTo(object, { 'b': function(n) { return n > 2; } });
* // => false
*/
function conformsTo(object, source) {
return source == null || baseConformsTo(object, source, keys(source));
}
module.exports = conformsTo;