8 lines
235 B
TypeScript
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)
|
||
|
}
|