has-own-property.js 422 B

1234567891011
  1. var uncurryThis = require('../internals/function-uncurry-this');
  2. var toObject = require('../internals/to-object');
  3. var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  4. // `HasOwnProperty` abstract operation
  5. // https://tc39.es/ecma262/#sec-hasownproperty
  6. // eslint-disable-next-line es-x/no-object-hasown -- safe
  7. module.exports = Object.hasOwn || function hasOwn(it, key) {
  8. return hasOwnProperty(toObject(it), key);
  9. };