Accessible Object.prototype.hasOwnProperty

Specification
Proposal repo

Modules

es.object.has-own.

Built-ins signatures

class Object {
  static hasOwn(object: object, key: PropertyKey): boolean;
}

Entry points

core-js/proposals/accessible-object-hasownproperty
core-js(-pure)/es|stable|actual|full/object/has-own

Examples

Object.hasOwn({ foo: 42 }, 'foo'); // => true
Object.hasOwn({ foo: 42 }, 'bar'); // => false
Object.hasOwn({}, 'toString');     // => false