It's not nice to show null or undefined to user, use blank to hide nullables under user friendly string.
null
undefined
Encourages usage of Nullish Coalescing operator... Fyi:
string.repeat
string.trim
export const sameBlank = blank.emDash;<p>{`username: ${user.name ?? sameBlank}`}</p><p>{`country: ${user.country ?? sameBlank}`}</p> Copy
export const sameBlank = blank.emDash;<p>{`username: ${user.name ?? sameBlank}`}</p><p>{`country: ${user.country ?? sameBlank}`}</p>
Generated using TypeDoc
It's not nice to show
null
orundefined
to user, use blank to hide nullables under user friendly string.Encourages usage of Nullish Coalescing operator... Fyi:
string.repeat
apistring.trim
apiExample