Nuxt/packages/kit/src/utils.ts
2023-12-23 14:22:58 +00:00

4 lines
101 B
TypeScript

export function toArray<T> (value: T | T[]): T[] {
return Array.isArray(value) ? value : [value]
}