SIGN IN SIGN UP

A modern JavaScript utility library delivering modularity, performance, & extras.

0 0 9 JavaScript
2016-08-07 21:21:03 -07:00
define([], function() {
2015-12-16 17:53:20 -08:00
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.has` without support for deep paths.
*
* @private
2016-05-21 00:48:34 -07:00
* @param {Object} [object] The object to query.
2015-12-16 17:53:20 -08:00
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHas(object, key) {
2016-08-07 21:21:03 -07:00
return object != null && hasOwnProperty.call(object, key);
2015-12-16 17:53:20 -08:00
}
return baseHas;
});