mirror of
https://github.com/directus/directus.git
synced 2026-01-23 11:07:56 -05:00
* Bump prettier from 2.2.1 to 2.3.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.2.1...2.3.0) Signed-off-by: dependabot[bot] <support@github.com> * Fix lint issues for updated prettier * Lets remove dev: true again so we can auto-add it later why don't we Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
8 lines
177 B
TypeScript
8 lines
177 B
TypeScript
export function toArray<T = any>(val: T | T[]): T[] {
|
|
if (typeof val === 'string') {
|
|
return val.split(',') as unknown as T[];
|
|
}
|
|
|
|
return Array.isArray(val) ? val : [val];
|
|
}
|