UNPKG

fui-fancyui

Version:
13 lines (12 loc) 475 B
import { useActiveBreakpoint as c } from "../useActiveBreakpoint/useActiveBreakpoint.js"; function p(s) { const { breakpointId: a, breakPoints: t } = s, i = c(t); if (!i) return null; const o = Object.keys(t), e = o.findIndex((n) => n === i), r = o.findIndex((n) => n === a); if (e === -1 || r === -1) throw new Error("Invalid breakpoint ID provided"); return e === r ? "isEqual" : e > r ? "isBigger" : "isSmaller"; } export { p as useBreakpointComparison };