2024-11-05 10:14:41 +08:00

8 lines
235 B
TypeScript

import { stringToPath } from './_stringToPath'
import type { PropertyName, PropertyPath } from './_common'
export function castPath(value: PropertyPath) {
return Array.isArray(value) ? value : stringToPath(value as PropertyName)
}