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.

19 lines 643 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.stringNormalizeNullUndefinedToEmpty = void 0; /** * @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}. */ function stringNormalizeNullUndefinedToEmpty(input) { if (input == null) { return ""; } return input; } exports.stringNormalizeNullUndefinedToEmpty = stringNormalizeNullUndefinedToEmpty; //# sourceMappingURL=string-normalize-null-undefined-to-empty.js.map