Skip to content

Instantly share code, notes, and snippets.

@graffhyrum
Created November 21, 2025 19:05
Show Gist options
  • Select an option

  • Save graffhyrum/014cde2044ce6acf00e5fa1031e473d9 to your computer and use it in GitHub Desktop.

Select an option

Save graffhyrum/014cde2044ce6acf00e5fa1031e473d9 to your computer and use it in GitHub Desktop.
TS Range
// No idea why this isn't stdlib
function range(start: number, stop: number, step = 1) {
return Array(stop - start + 1).keys().map(k => k + start);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment