mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-24 17:41:03 +01:00
9 lines
174 B
TypeScript
9 lines
174 B
TypeScript
export const getPrimaryPath = (path: string): string => {
|
|
const arr = path.split('/');
|
|
if (arr.length <= 1) {
|
|
return path;
|
|
} else {
|
|
return `/${arr[1]}`;
|
|
}
|
|
};
|