用法
joinPath 函数用于将片段数组序列化为路径字符串。
import { joinPath } from '@movk/core'
const p = joinPath(['a', 'x.y', 0, 'space key'])
// p: "a['x.y'][0]['space key']"
// 与解析往返:toPath(p) => ['a', 'x.y', 0, 'space key']
API
joinPath(segments)
将片段数组序列化为路径字符串。
参数
segments
[string | number]() required
路径片段数组。
返回值
返回值
string
路径字符串。
Changelog
No recent changes