full site update
This commit is contained in:
8
node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
generated
vendored
Normal file
8
node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export 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("/");
|
||||
};
|
Reference in New Issue
Block a user