Movk Core
toPath
将一个路径字符串解析为一个由字符串键和数字索引组成的片段数组。
import { toPath } from '@movk/core' toPath('a.b[0].c') // => ['a', 'b', 0, 'c'] toPath('a[\'key with.dot\']') // => ['a', 'key with.dot']
toPath(path: string | (string | number)[]): (string | number)[]
setPath
根据路径在一个对象中设置深层嵌套的属性值。
camelCase
将字符串转换为驼峰式 (helloWorld)。
页面导航
社区