* Returns an own-property check, using `Object.hasOwn` when supported and * falling back to `Object.prototype.hasOwnProperty.call` otherwise. * @param {string} object object expression * @param {string} property property expression * @returns {string} own-property check expression
(object, property)
| 427 | * @returns {string} own-property check expression |
| 428 | */ |
| 429 | objectHasOwn(object, property) { |
| 430 | return this.supportsObjectHasOwn() |
| 431 | ? `Object.hasOwn(${object}, ${property})` |
| 432 | : `Object.prototype.hasOwnProperty.call(${object}, ${property})`; |
| 433 | } |
| 434 | |
| 435 | /** |
| 436 | * Returns a self-defaulting assignment, using the `||=` logical assignment |
no test coverage detected