您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

_baseHas.js 559B

12345678910111213141516171819
  1. /** Used for built-in method references. */
  2. var objectProto = Object.prototype;
  3. /** Used to check objects for own properties. */
  4. var hasOwnProperty = objectProto.hasOwnProperty;
  5. /**
  6. * The base implementation of `_.has` without support for deep paths.
  7. *
  8. * @private
  9. * @param {Object} [object] The object to query.
  10. * @param {Array|string} key The key to check.
  11. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  12. */
  13. function baseHas(object, key) {
  14. return object != null && hasOwnProperty.call(object, key);
  15. }
  16. module.exports = baseHas;