Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2017/IteratorClose.js
r0c6b92a r79a0317 7 7 var GetMethod = require('./GetMethod'); 8 8 var IsCallable = require('./IsCallable'); 9 var Type = require('./Type'); 9 10 var isObject = require('../helpers/isObject'); 10 11 11 12 // https://262.ecma-international.org/6.0/#sec-iteratorclose 12 13 13 14 module.exports = function IteratorClose(iterator, completion) { 14 if ( Type(iterator) !== 'Object') {15 if (!isObject(iterator)) { 15 16 throw new $TypeError('Assertion failed: Type(iterator) is not Object'); 16 17 } … … 42 43 completionThunk = null; // ensure it's not called twice. 43 44 44 if ( Type(innerResult) !== 'Object') {45 if (!isObject(innerResult)) { 45 46 throw new $TypeError('iterator .return must return an object'); 46 47 }
Note:
See TracChangeset
for help on using the changeset viewer.