stringUndefinedAttribute
This function checks the type of the input value and returns a string or undefined based on the input. If the input value is a not empty string, it returns the value as is. Otherwise, it returns undefined.
Presentation
function stringUndefinedAttribute (value: unknown): string | undefined;
Returns
string | undefined
-{string | undefined} - The output value based on the input.
Parameters
Name | Type | Description |
---|---|---|
value | unknown | @param {unknown} value - The input value to be checked. |