Range a-la python is a generator and is pretty straightforward in js as is. There is no need for a complicated solution and/or as part of stdlib, imo:
function* range(x, y) {
while (x <= y) {yield x++}
// or ‘<‘ if you want half-open one
}
for (let n of range(3, 5)){
console.log(n)
}
array = [...range(3, 5)]
console.log(array)