Coerces a value to a cleaned, non-empty string. Returns the trimmed string if valid, otherwise returns undefined (or an optional fallback).
The value to normalize
Optional fallback if str is not a valid non-empty string
OptionaldeepClean: boolean
If true, applies trimAll to normalize tabs, newlines, and collapsed spaces
The cleaned string or fallback
Coerces a value to a cleaned, non-empty string. Returns the trimmed string if valid, otherwise returns undefined (or an optional fallback).
The value to normalize
Optional fallback if str is not a valid non-empty string
OptionaldeepClean: boolean
If true, applies trimAll to normalize tabs, newlines, and collapsed spaces
The cleaned string or fallback
Coerces a value to a cleaned, non-empty string. Returns the trimmed string if valid, otherwise returns undefined (or an optional fallback).
The value to normalize
Optional fallback if str is not a valid non-empty string
OptionaldeepClean: boolean
If true, applies trimAll to normalize tabs, newlines, and collapsed spaces
The cleaned string or fallback
Coerces a value to a cleaned, non-empty string. Returns the trimmed string if valid, otherwise returns undefined (or an optional fallback).