UNPKG

@danwithabox/nullish

Version:

Utilities that pair well with the lovely nullish coalescing (??) operator

15 lines (14 loc) 278 B
// src/nullish-map.ts function nullishMap(value, mapFn) { if (value !== null && value !== void 0) return mapFn(value); return value; } // src/nullish-of.ts function nullishOf(value) { return value; } export { nullishMap, nullishOf }; //# sourceMappingURL=index.js.map