getRelativePath 函数用于获取两个 URL 之间的相对路径。
import { getRelativePath } from '@movk/core'
getRelativePath('https://example.com/a/b', 'https://example.com/a/c')
// '../c'
getRelativePath('https://example.com/a', 'https://example.com/a/b/c')
// 'b/c'
getRelativePath(from, to)获取两个 URL 之间的相对路径。
7c832 — refactor!: 重构模块架构,拆分 utils 为专业化模块