js-util

Home > rc-js-util > stringNormalizeNullUndefinedToEmpty

stringNormalizeNullUndefinedToEmpty() function

Replaces null / undefined with an empty string.

Signature:

export declare function stringNormalizeNullUndefinedToEmpty(input: string | null | undefined): string;

Parameters

Parameter Type Description
input string | null | undefined  

Returns:

string

input if it’s a string of length greater than 0, otherwise an empty string.

Remarks

See stringNormalizeNullUndefinedToEmpty().