Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2019/EnumerableOwnPropertyNames.js
r0c6b92a r79a0317 1 1 'use strict'; 2 3 var GetIntrinsic = require('get-intrinsic');4 2 5 3 var $TypeError = require('es-errors/type'); 6 4 7 5 var objectKeys = require('object-keys'); 8 9 var callBound = require('call-bind/callBound'); 10 11 var callBind = require('call-bind'); 6 var safePushApply = require('safe-push-apply'); 7 var callBound = require('call-bound'); 12 8 13 9 var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); 14 var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%'));15 10 16 11 var forEach = require('../helpers/forEach'); 17 18 var Type = require('./Type'); 12 var isObject = require('../helpers/isObject'); 19 13 20 14 // https://262.ecma-international.org/8.0/#sec-enumerableownproperties 21 15 22 16 module.exports = function EnumerableOwnPropertyNames(O, kind) { 23 if ( Type(O) !== 'Object') {17 if (!isObject(O)) { 24 18 throw new $TypeError('Assertion failed: Type(O) is not Object'); 25 19 } … … 33 27 forEach(keys, function (key) { 34 28 if ($isEnumerable(O, key)) { 35 $pushApply(results, [29 safePushApply(results, [ 36 30 kind === 'value' ? O[key] : [key, O[key]] 37 31 ]);
Note:
See TracChangeset
for help on using the changeset viewer.