julong-lib/utils/isStringEmpty.ts

6 lines
200 B
TypeScript

export const isStringEmpty = (input: string | null | undefined): boolean => {
if (input === null || input === undefined) {
return true;
}
return input.trim().length === 0;
};