UNPKG

@prelude/cmp

Version:

Cmp module.

11 lines 399 B
import { eq, asc, dsc } from './prelude.js'; /** @returns composed non-nullish comparision function as nullish-handling function, nullish values are considered lower than non-nullish values. */ const nullishOr = (cmp) => (a, b) => a == null ? b == null ? eq : asc : b == null ? dsc : cmp(a, b); export default nullishOr; //# sourceMappingURL=nullish-or.js.map