the editable site (validation-lab)
This commit is contained in:
commit
3ac81d5a52
13454 files changed
+2227005
No files matched your search
+8
@@ -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