Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2017/OrdinaryDefineOwnProperty.js
r0c6b92a r79a0317 9 9 var IsAccessorDescriptor = require('./IsAccessorDescriptor'); 10 10 var IsExtensible = require('./IsExtensible'); 11 var IsPropertyKey = require('./IsPropertyKey');11 var isPropertyKey = require('../helpers/isPropertyKey'); 12 12 var ToPropertyDescriptor = require('./ToPropertyDescriptor'); 13 13 var SameValue = require('./SameValue'); 14 var Type = require('./Type');15 14 var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor'); 15 16 var isObject = require('../helpers/isObject'); 16 17 17 18 // https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty 18 19 19 20 module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) { 20 if ( Type(O) !== 'Object') {21 if (!isObject(O)) { 21 22 throw new $TypeError('Assertion failed: O must be an Object'); 22 23 } 23 if (! IsPropertyKey(P)) {24 if (!isPropertyKey(P)) { 24 25 throw new $TypeError('Assertion failed: P must be a Property Key'); 25 26 }
Note:
See TracChangeset
for help on using the changeset viewer.