remove unused function

not present upstream, not mentioned anywhere
This commit is contained in:
dakkar 2024-08-30 13:38:44 +01:00
parent 5f93b10fb7
commit 27f3d76a2b
1 changed files with 0 additions and 4 deletions

View File

@ -104,7 +104,3 @@ export function toArray<T>(x: T | T[] | undefined): T[] {
export function toSingle<T>(x: T | T[] | undefined): T | undefined { export function toSingle<T>(x: T | T[] | undefined): T | undefined {
return Array.isArray(x) ? x[0] : x; return Array.isArray(x) ? x[0] : x;
} }
export function toSingleLast<T>(x: T | T[] | undefined): T | undefined {
return Array.isArray(x) ? x.at(-1) : x;
}