make a new package for helpers

This commit is contained in:
itsMapleLeaf
2022-07-27 22:42:35 -05:00
parent 0df45acba3
commit 831bf9ea44
35 changed files with 276 additions and 49 deletions

3
packages/helpers/last.ts Normal file
View File

@@ -0,0 +1,3 @@
export function last<T>(array: T[]): T | undefined {
return array[array.length - 1]
}