(path?: Path | undefined)
| 2 | import { Path } from "./types"; |
| 3 | |
| 4 | export function flattenPath(path?: Path | undefined): string { |
| 5 | if (typeof path !== "number" && !path) return ""; |
| 6 | if (!Array.isArray(path)) return path.toString(); |
| 7 | return _.flattenDeep(path) |
| 8 | .filter((s: number | string) => s.toString().length) |
| 9 | .join("."); |
| 10 | } |