symbol.iterator.js 270 B

12345678910111213141516
  1. 'use strict';
  2. module.exports = function SymbolIterator() {
  3. var _this = this;
  4. var index = -1;
  5. return {
  6. next: function next() {
  7. index += 1;
  8. return {
  9. value: _this.items[index],
  10. done: index >= _this.items.length
  11. };
  12. }
  13. };
  14. };