(path: PathType)
| 83 | } |
| 84 | |
| 85 | function checkPath(path: PathType): boolean { |
| 86 | if (!isArray(path)) { |
| 87 | return false; |
| 88 | } |
| 89 | for (const pathPart of path) { |
| 90 | if (typeof pathPart !== "string" && typeof pathPart !== "number") { |
| 91 | return false; |
| 92 | } |
| 93 | } |
| 94 | return true; |
| 95 | } |
| 96 | |
| 97 | function setPath(obj: any, path: PathType, value: any, opts: SetPathOpts) { |
| 98 | if (opts == null) { |
no test coverage detected