refactor: create structure for backend

This commit is contained in:
2023-10-26 12:05:16 +02:00
parent 42d3cb5b65
commit 7eeef67b29
81 changed files with 491 additions and 48 deletions
+6
View File
@@ -0,0 +1,6 @@
export function arraySetN<T>(array: T[], n: number, elem: T): T[] {
if (array.length < n || n < 0) {
return array
}
return [...array.slice(0, n), elem, ...array.slice(n+1)]
}