mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-01 12:19:21 +01:00
8 lines
261 B
TypeScript
8 lines
261 B
TypeScript
export const capitalize = <T extends string>(str: T) => {
|
|
return (str.charAt(0).toUpperCase() + str.slice(1)) as Capitalize<T>;
|
|
};
|
|
|
|
export const isNullOrWhitespace = (value: string | null): value is null => {
|
|
return value == null || value.trim() === "";
|
|
};
|