Ignore:
Timestamp:
01/21/25 03:08:24 (3 days ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
0c6b92a
Message:

F4 Finalna Verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/es-abstract/2024/DefinePropertyOrThrow.js

    r0c6b92a r79a0317  
    88var FromPropertyDescriptor = require('./FromPropertyDescriptor');
    99var IsDataDescriptor = require('./IsDataDescriptor');
    10 var IsPropertyKey = require('./IsPropertyKey');
     10var isPropertyKey = require('../helpers/isPropertyKey');
    1111var SameValue = require('./SameValue');
    1212var ToPropertyDescriptor = require('./ToPropertyDescriptor');
    13 var Type = require('./Type');
     13
     14var isObject = require('../helpers/isObject');
    1415
    1516// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
    1617
    1718module.exports = function DefinePropertyOrThrow(O, P, desc) {
    18         if (Type(O) !== 'Object') {
     19        if (!isObject(O)) {
    1920                throw new $TypeError('Assertion failed: Type(O) is not Object');
    2021        }
    2122
    22         if (!IsPropertyKey(P)) {
    23                 throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');
     23        if (!isPropertyKey(P)) {
     24                throw new $TypeError('Assertion failed: P is not a Property Key');
    2425        }
    2526
Note: See TracChangeset for help on using the changeset viewer.