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/2019/EnumerableOwnPropertyNames.js

    r0c6b92a r79a0317  
    11'use strict';
    2 
    3 var GetIntrinsic = require('get-intrinsic');
    42
    53var $TypeError = require('es-errors/type');
    64
    75var objectKeys = require('object-keys');
    8 
    9 var callBound = require('call-bind/callBound');
    10 
    11 var callBind = require('call-bind');
     6var safePushApply = require('safe-push-apply');
     7var callBound = require('call-bound');
    128
    139var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
    14 var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%'));
    1510
    1611var forEach = require('../helpers/forEach');
    17 
    18 var Type = require('./Type');
     12var isObject = require('../helpers/isObject');
    1913
    2014// https://262.ecma-international.org/8.0/#sec-enumerableownproperties
    2115
    2216module.exports = function EnumerableOwnPropertyNames(O, kind) {
    23         if (Type(O) !== 'Object') {
     17        if (!isObject(O)) {
    2418                throw new $TypeError('Assertion failed: Type(O) is not Object');
    2519        }
     
    3327                forEach(keys, function (key) {
    3428                        if ($isEnumerable(O, key)) {
    35                                 $pushApply(results, [
     29                                safePushApply(results, [
    3630                                        kind === 'value' ? O[key] : [key, O[key]]
    3731                                ]);
Note: See TracChangeset for help on using the changeset viewer.