frontend/.pnpm-store/v3/files/cc/15e072681c872a9ae5d5e5f56040a0dd62babf20e4d6ff4dd1cd73c281aa77fd3e6c4a0492fe504e8e98e297117e9f1d7433432a0d28fd76691f87ebd30042

21 lines
512 B
Plaintext

'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = GetIntrinsic('%TypeError%');
var IsPropertyKey = require('./IsPropertyKey');
var Type = require('./Type');
// https://262.ecma-international.org/6.0/#sec-hasproperty
module.exports = function HasProperty(O, P) {
if (Type(O) !== 'Object') {
throw new $TypeError('Assertion failed: `O` must be an Object');
}
if (!IsPropertyKey(P)) {
throw new $TypeError('Assertion failed: `P` must be a Property Key');
}
return P in O;
};