Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2022/CreateMethodProperty.js
r0c6b92a r79a0317 7 7 var FromPropertyDescriptor = require('./FromPropertyDescriptor'); 8 8 var IsDataDescriptor = require('./IsDataDescriptor'); 9 var IsPropertyKey = require('./IsPropertyKey');9 var isPropertyKey = require('../helpers/isPropertyKey'); 10 10 var SameValue = require('./SameValue'); 11 var Type = require('./Type'); 11 12 var isObject = require('../helpers/isObject'); 12 13 13 14 // https://262.ecma-international.org/6.0/#sec-createmethodproperty 14 15 15 16 module.exports = function CreateMethodProperty(O, P, V) { 16 if ( Type(O) !== 'Object') {17 if (!isObject(O)) { 17 18 throw new $TypeError('Assertion failed: Type(O) is not Object'); 18 19 } 19 20 20 if (! IsPropertyKey(P)) {21 throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');21 if (!isPropertyKey(P)) { 22 throw new $TypeError('Assertion failed: P is not a Property Key'); 22 23 } 23 24
Note:
See TracChangeset
for help on using the changeset viewer.