00a3c8ca2b
* Change to using arrow functions Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> * Add lint rule --------- Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
16 lines
349 B
TypeScript
16 lines
349 B
TypeScript
import { isDefined } from './isDefined';
|
|
|
|
export const isNonEmptyString = (
|
|
probableNonEmptyString: string | undefined | null,
|
|
): probableNonEmptyString is string => {
|
|
if (
|
|
isDefined(probableNonEmptyString) &&
|
|
typeof probableNonEmptyString === 'string' &&
|
|
probableNonEmptyString !== ''
|
|
) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
};
|