code: function iterRanges(min, max, padding) {
    let index = min;
  
    return {
      reset: () => { index = min; },
      next: () => {
        if (index <= max) {
          let value = index;
          if (padding) {
            value = padNumber(index, padding);
          }
          index += 1;
  
          return {
            value,
            done: false,
          };
        }
        return { done: true };
      },
    };
  }
docs: We can't use arrays to avoid a huge memory fingerprints in case of huge ones. So we use custom iterators: https://developer.mozilla.org/es/docs/Web/JavaScript/Guide/Iterators_and_Generators