Nuxt/packages/nuxt/src/app/utils.ts

4 lines
101 B
TypeScript
Raw Normal View History

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