source: imaps-frontend/node_modules/es-abstract/2020/IteratorNext.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 450 bytes
Line 
1'use strict';
2
3var $TypeError = require('es-errors/type');
4
5var Invoke = require('./Invoke');
6
7var isObject = require('../helpers/isObject');
8
9// https://262.ecma-international.org/6.0/#sec-iteratornext
10
11module.exports = function IteratorNext(iterator, value) {
12 var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
13 if (!isObject(result)) {
14 throw new $TypeError('iterator next must return an object');
15 }
16 return result;
17};
Note: See TracBrowser for help on using the repository browser.