alinea
Version:
[](https://npmjs.org/package/alinea) [](https://packagephobia.com/result?p=alinea)
17 lines (15 loc) • 382 B
JavaScript
import "../../chunks/chunk-U5RRZUYZ.js";
// src/core/util/Urls.ts
function joinPaths(...paths) {
return paths.filter(Boolean).map((part, i) => {
let start = 0, end = void 0;
if (i < paths.length - 1 && part.endsWith("/"))
end = -1;
if (i > 0 && part.startsWith("/"))
start = 1;
return part.slice(start, end);
}).join("/");
}
export {
joinPaths
};