Files
Joakim Jäderberg bc5a606289 Merged in feature/turbopack (pull request #3117)
Feature/turbopack

* .

* .

* pin import-in-the-middle

* update marker

* revert back to using *.graphql.ts


Approved-by: Linus Flood
2025-11-11 09:51:40 +00:00

29 lines
598 B
TypeScript

export {}
if (!Array.prototype.at) {
Array.prototype.at = function (index: number) {
// Convert the index to an integer
index = Math.trunc(index) || 0
if (index < 0) {
index += this.length
}
if (index < 0 || index >= this.length) {
return undefined
}
return this[index]
}
}
if (!String.prototype.at) {
String.prototype.at = function (index: number) {
index = Math.trunc(index) || 0
if (index < 0) {
index += this.length
}
if (index < 0 || index >= this.length) {
return undefined
}
return this.charAt(index)
}
}