@tempots/std
ifEmptyString() function
ifEmpty
returns value
if it is neither null
or empty, otherwise it returns alt
Signature:
ifEmptyString: (value: string, alt: string) => string
Parameters
Parameter |
Type |
Description |
---|---|---|
value |
string |
The string to check. |
alt |
string |
The alternative value to return if |
Returns: string
The original string if it is not null
or empty, otherwise the alternative value.