import { split } from "../array/split"; export const slicePath = (path: string, start = 0, end?: number) => { const paths = split('/', path); if(!end){ end = paths.length - 1; } const newPaths = paths.slice(start, end); return '/' + newPaths.join('/'); }