feat(MED-168): move toArray to shared utils

This commit is contained in:
2025-09-19 09:17:23 +03:00
parent 2bdd54e649
commit 08b27b022f
7 changed files with 9 additions and 15 deletions

View File

@@ -57,3 +57,8 @@ export const getPersonParameters = (personalCode: string) => {
return null;
}
};
export function toArray<T>(input?: T | T[] | null): T[] {
if (!input) return [];
return Array.isArray(input) ? input : [input];
}