getRange = (number) => {
 if (!isFinite(number)) { return [0] }

 return Array(number).fill().map((_, i) => i + 1);
}
Gets a range from a single value.
TODO: Could probably make this take a predicate to avoid running through the loop twice