mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-02 02:17:15 +00:00
5 lines
121 B
TypeScript
5 lines
121 B
TypeScript
/** @since 3.9.0 */
|
|
export function toArray<T> (value: T | T[]): T[] {
|
|
return Array.isArray(value) ? value : [value]
|
|
}
|