IteratorStep.js 348 B

12345678910111213
  1. 'use strict';
  2. var IteratorComplete = require('./IteratorComplete');
  3. var IteratorNext = require('./IteratorNext');
  4. // https://262.ecma-international.org/6.0/#sec-iteratorstep
  5. module.exports = function IteratorStep(iterator) {
  6. var result = IteratorNext(iterator);
  7. var done = IteratorComplete(result);
  8. return done === true ? false : result;
  9. };