Skip to content

Instantly share code, notes, and snippets.

@miguel-leon
Created November 27, 2018 19:11
Show Gist options
  • Save miguel-leon/52f127f7cae7cb610426927b83f7205e to your computer and use it in GitHub Desktop.
Save miguel-leon/52f127f7cae7cb610426927b83f7205e to your computer and use it in GitHub Desktop.
export {};
declare global {
interface ArrayConstructor {
range(size, start?): number[];
}
}
Array.range = Array.range || function (size, start = 0) {
return Array.from(Array(size + start).keys()).slice(start);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment