remove-subpath.ts 152 字节
Newer Older
P
Peter Pan 已提交
1 2
export const removeSubpath = (url: string | undefined, subpath: string) =>
    url?.replace(subpath, '').replace(/(https?:\/\/)|(\/)+/g, '$1$2') || '';