Files
twenty/packages/twenty-front/src/utils/compareNonEmptyStrings.ts
T
2025-08-10 23:25:58 +02:00

14 lines
325 B
TypeScript

import { isNonEmptyString } from '@sniptt/guards';
import { type Nullable } from 'twenty-ui/utilities';
export const compareNonEmptyStrings = (
valueA: Nullable<string>,
valueB: Nullable<string>,
) => {
if (!isNonEmptyString(valueA) && !isNonEmptyString(valueB)) {
return true;
}
return valueA === valueB;
};