@baseplate-dev/project-builder-web
Version:
Web interface for constructing project builder JSON
3 lines (2 loc) • 385 B
JavaScript
function h(t,n,r){return t<n?r==="asc"?-1:1:t>n?r==="asc"?1:-1:0}function p(t,n,r){return t.slice().sort((c,s)=>{const u=r.length;for(let o=0;o<n.length;o++){const l=u>o?r[o]:r[u-1],e=n[o],i=typeof e=="function",a=i?e(c):c[e],g=i?e(s):s[e],f=h(a,g,l);if(f!==0)return f}return 0})}function y(t,n){return p(t,n,["asc"])}export{p as o,y as s};
//# sourceMappingURL=sortBy-C9bvycg5.js.map