Add vendor creation
Signed-off-by: Bryan Frimin <bryan@getprobo.com> Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
committed by
Sacha Al Himdani
parent
fe3128da2a
commit
c2a69b5428
@@ -18,3 +18,13 @@ export function groupBy<T>(
|
||||
{} as Record<string, T[]>,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that a value is empty (null, undefined, empty string, empty array, empty object)
|
||||
*/
|
||||
export function isEmpty(v: unknown) {
|
||||
if (Array.isArray(v)) {
|
||||
return v.find((v) => !isEmpty(v)) === undefined;
|
||||
}
|
||||
return !v;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user