Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2023/DeletePropertyOrThrow.js
r0c6b92a r79a0317 3 3 var $TypeError = require('es-errors/type'); 4 4 5 var IsPropertyKey = require('./IsPropertyKey');6 var Type = require('./Type');5 var isObject = require('../helpers/isObject'); 6 var isPropertyKey = require('../helpers/isPropertyKey'); 7 7 8 8 // https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow 9 9 10 10 module.exports = function DeletePropertyOrThrow(O, P) { 11 if ( Type(O) !== 'Object') {11 if (!isObject(O)) { 12 12 throw new $TypeError('Assertion failed: Type(O) is not Object'); 13 13 } 14 14 15 if (! IsPropertyKey(P)) {16 throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');15 if (!isPropertyKey(P)) { 16 throw new $TypeError('Assertion failed: P is not a Property Key'); 17 17 } 18 18
Note:
See TracChangeset
for help on using the changeset viewer.