UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

15 lines 436 B
/** * @public * Replaces `null` / `undefined` with an empty `string`. * @returns `input` if it's a `string` of length greater than 0, otherwise an empty `string`. * * @remarks * See {@link stringNormalizeNullUndefinedToEmpty}. */ export function stringNormalizeNullUndefinedToEmpty(input) { if (input == null) { return ""; } return input; } //# sourceMappingURL=string-normalize-null-undefined-to-empty.js.map