UNPKG

lib0

Version:

> Monorepo of isomorphic utility functions

14 lines (12 loc) 218 B
/** * Often used conditions. * * @module conditions */ /** * @template T * @param {T|null|undefined} v * @return {T|null} */ /* c8 ignore next */ export const undefinedToNull = v => v === undefined ? null : v