6 lines
149 B
TypeScript
6 lines
149 B
TypeScript
export const turnIntoUndefinedIfWhitespacesOnly = (
|
|
value: string,
|
|
): string | undefined => {
|
|
return value.trim() === '' ? undefined : value;
|
|
};
|