UNPKG

@comparison-sorting/is-sorted

Version:
3 lines (2 loc) 199 B
function r(r,n,t,e){if(t>=e)return e;for(;++t<e&&!(r(n[t-1],n[t])>0););return t}exports.firstInversion=r,exports.isSorted=function(n,t,e,o){return r(n,t,e,o)===o}; //# sourceMappingURL=index.cjs.map