laif-ds
Version:
Design System di Laif con componenti React basati su principi di Atomic Design
18 lines (17 loc) • 461 B
JavaScript
"use client";
import i from "./ascending.js";
function o(n = i) {
if (n === i) return u;
if (typeof n != "function") throw new TypeError("compare is not a function");
return (t, e) => {
const r = n(t, e);
return r || r === 0 ? r : (n(e, e) === 0) - (n(t, t) === 0);
};
}
function u(n, t) {
return (n == null || !(n >= n)) - (t == null || !(t >= t)) || (n < t ? -1 : n > t ? 1 : 0);
}
export {
u as ascendingDefined,
o as compareDefined
};