export const joinPaths = (...args: string[]) => args.map((a, i, l) => i === l.length - 1 ? a : a.replace(/\/?\.?\*?$/, "")) .join("");