UNPKG

remeda

Version:

A utility library for JavaScript and Typescript.

2 lines (1 loc) 331 B
import{a}from"./chunk-WIMGWYZL.js";function x(...e){return a(d,e)}var d=(e,n,t)=>typeof e=="string"?o([...e],n,t).join(""):o(e,n,t);function o(e,n,t){let r=[...e];if(Number.isNaN(n)||Number.isNaN(t))return r;let s=n<0?e.length+n:n,i=t<0?e.length+t:t;return s<0||s>e.length||i<0||i>e.length||(r[s]=e[i],r[i]=e[s]),r}export{x as a};