remove unused function
not present upstream, not mentioned anywhere
This commit is contained in:
parent
5f93b10fb7
commit
27f3d76a2b
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue