Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2019/CreateDataPropertyOrThrow.js
r0c6b92a r79a0317 4 4 5 5 var CreateDataProperty = require('./CreateDataProperty'); 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/6.0/#sec-createdatapropertyorthrow 10 11 11 12 module.exports = function CreateDataPropertyOrThrow(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 if (! IsPropertyKey(P)) {16 throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');16 if (!isPropertyKey(P)) { 17 throw new $TypeError('Assertion failed: P is not a Property Key'); 17 18 } 18 19 var success = CreateDataProperty(O, P, V);
Note:
See TracChangeset
for help on using the changeset viewer.