UNPKG

218 BJavaScriptView Raw
1/**
2 * Often used conditions.
3 *
4 * @module conditions
5 */
6
7/**
8 * @template T
9 * @param {T|null|undefined} v
10 * @return {T|null}
11 */
12/* c8 ignore next */
13export const undefinedToNull = v => v === undefined ? null : v