Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2016/CreateDataProperty.js
r0c6b92a r79a0317 3 3 var $TypeError = require('es-errors/type'); 4 4 5 var IsPropertyKey = require('./IsPropertyKey');5 var isPropertyKey = require('../helpers/isPropertyKey'); 6 6 var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty'); 7 var Type = require('./Type'); 7 8 var isObject = require('../helpers/isObject'); 8 9 9 10 // https://262.ecma-international.org/6.0/#sec-createdataproperty 10 11 11 12 module.exports = function CreateDataProperty(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 newDesc = {
Note:
See TracChangeset
for help on using the changeset viewer.