web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
493 B

  1. 'use strict';
  2. var GetIntrinsic = require('get-intrinsic');
  3. var $TypeError = GetIntrinsic('%TypeError%');
  4. var Invoke = require('./Invoke');
  5. var Type = require('./Type');
  6. // https://ecma-international.org/ecma-262/6.0/#sec-iteratornext
  7. module.exports = function IteratorNext(iterator, value) {
  8. var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
  9. if (Type(result) !== 'Object') {
  10. throw new $TypeError('iterator next must return an object');
  11. }
  12. return result;
  13. };