UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

18 lines (17 loc) 480 B
"use client"; function p(e, n, c, l) { const f = e.length; let u = 0, h; if (n < 0 ? n = -n > f ? 0 : f + n : n = n > f ? f : n, c = c > 0 ? c : 0, l.length < 1e4) h = Array.from(l), h.unshift(n, c), e.splice(...h); else for (c && e.splice(n, c); u < l.length; ) h = l.slice(u, u + 1e4), h.unshift(n, 0), e.splice(...h), u += 1e4, n += 1e4; } function g(e, n) { return e.length > 0 ? (p(e, e.length, 0, n), e) : n; } export { g as push, p as splice };