Created
November 27, 2018 19:11
-
-
Save miguel-leon/52f127f7cae7cb610426927b83f7205e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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