Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2021/GetIterator.js
r0c6b92a r79a0317 15 15 var GetMethod = require('./GetMethod'); 16 16 var IsArray = require('./IsArray'); 17 var Type = require('./Type'); 17 18 var isObject = require('../helpers/isObject'); 19 20 var ES = { 21 AdvanceStringIndex: AdvanceStringIndex, 22 GetMethod: GetMethod, 23 IsArray: IsArray 24 }; 18 25 19 26 // https://262.ecma-international.org/11.0/#sec-getiterator … … 38 45 } 39 46 } else { 40 actualMethod = getIteratorMethod( 41 { 42 AdvanceStringIndex: AdvanceStringIndex, 43 GetMethod: GetMethod, 44 IsArray: IsArray 45 }, 46 obj 47 ); 47 actualMethod = getIteratorMethod(ES, obj); 48 48 } 49 49 } 50 50 var iterator = Call(actualMethod, obj); 51 if ( Type(iterator) !== 'Object') {51 if (!isObject(iterator)) { 52 52 throw new $TypeError('iterator must return an object'); 53 53 }
Note:
See TracChangeset
for help on using the changeset viewer.