source: frontend/node_modules/es-abstract/2018/IteratorNext.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

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