// Number iterator for iterating from 0 to Number
// http://blog.getify.com/iterating-es6-numbers/comment-page-1/#comment-535319

function numberIterator(total, increment = 1) {
	return {
		[Symbol.iterator]: function() {
			var i, count;

			return {
				next: function() {
					if (count === undefined) {
						i = 0;
						count = 1;
						return {
							value: 0,
							done: false
						};
					} else if (count < total) {
						i += increment;
						count++;
						return {
							value: i,
							done: false
						};
					} else {
						return {
							done: true
						};
					}
				}
			};
		}
	};
}

export default numberIterator;

// Number iterator for iterating from 0 to Number
// http://blog.getify.com/iterating-es6-numbers/comment-page-1/#comment-535319

function numberIterator({ length, increment, start }) {
	if (length === undefined) {
		length = 10;
	}
	if (increment === undefined) {
		increment = 1;
	}
	if (start === undefined) {
		start = 0;
	}
	return {
		[Symbol.iterator] : function() {
			let number, count;

			return {
				next : function() {
					if (count === undefined) {
						count  = 1;
						number = start;
						return {
							value : number,
							done  : false
						};
					} else if (count < length) {
						count++;
						number += increment;
						return {
							value : number,
							done  : false
						};
					} else {
						return {
							done : true
						};
					}
				}
			};
		}
	};
}

export default numberIterator;

Refactor num iterator for new spec :white_check_mark:
Refactor num iterator for new spec :white_check_mark:
