UNPKG

remeda

Version:

A utility library for JavaScript and Typescript.

2 lines 544 B
import{swapInPlace as e}from"./swapInPlace-CPRo9crU.js";import{purryOrderRulesWithArgument as t}from"./purryOrderRules-CfRtTEyM.js";const n=(e,t,n)=>t<0||t>=e.length?void 0:r([...e],0,e.length-1,t,n);function r(e,t,n,a,o){if(t===n)return e[t];let s=i(e,t,n,o);return a===s?e[a]:r(e,a<s?t:s+1,a<s?s-1:n,a,o)}function i(t,n,r,i){let a=t[r],o=n;for(let s=n;s<r;s++)i(t[s],a)<0&&(e(t,o,s),o+=1);return e(t,o,r),o}function a(...e){return t(o,e)}const o=(e,t,r)=>n(e,r>=0?r:e.length+r,t);export{a as nthBy}; //# sourceMappingURL=nthBy-DaMPtctL.js.map