securityos/node_modules/object.hasown/implementation.js

12 lines
327 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
var ToObject = require('es-object-atoms/ToObject');
var ToPropertyKey = require('es-abstract/2024/ToPropertyKey');
var HasOwnProperty = require('es-abstract/2024/HasOwnProperty');
module.exports = function hasOwn(O, P) {
var obj = ToObject(O);
var key = ToPropertyKey(P);
return HasOwnProperty(obj, key);
};