Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2017/GetIterator.js
r0c6b92a r79a0317 8 8 var GetMethod = require('./GetMethod'); 9 9 var IsArray = require('./IsArray'); 10 var Type = require('./Type'); 10 11 var isObject = require('../helpers/isObject'); 12 13 var ES = { 14 AdvanceStringIndex: AdvanceStringIndex, 15 GetMethod: GetMethod, 16 IsArray: IsArray 17 }; 11 18 12 19 // https://262.ecma-international.org/6.0/#sec-getiterator … … 15 22 var actualMethod = method; 16 23 if (arguments.length < 2) { 17 actualMethod = getIteratorMethod( 18 { 19 AdvanceStringIndex: AdvanceStringIndex, 20 GetMethod: GetMethod, 21 IsArray: IsArray 22 }, 23 obj 24 ); 24 actualMethod = getIteratorMethod(ES, obj); 25 25 } 26 26 var iterator = Call(actualMethod, obj); 27 if ( Type(iterator) !== 'Object') {27 if (!isObject(iterator)) { 28 28 throw new $TypeError('iterator must return an object'); 29 29 }
Note:
See TracChangeset
for help on using the changeset viewer.