Files
SnowLuma/.pnpm-store/v11/files/25/6a353d4b4b29f6bf3ed464954aa83a00c24599fa676d71bd2f528419b371012e7246ff9ae749eff20a799b7778557ec7949289efd8cfbf8e4e8b038e2e40b0
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

13 lines
405 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRelativePath = void 0;
const getRelativePath = (pathA, pathB) => {
let i = 0;
for (; i < pathA.length && i < pathB.length; i++) {
if (pathA[i] !== pathB[i])
break;
}
return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
};
exports.getRelativePath = getRelativePath;