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