* Checks every key of a path before anything is created, so that a rejected * path leaves no empty scope behind.
(node: any, keys: string[], path: string)
| 40 | * path leaves no empty scope behind. |
| 41 | */ |
| 42 | function assertPath(node: any, keys: string[], path: string) { |
| 43 | for (const key of keys) { |
| 44 | assertOwnOrNew(node, key, path); |
| 45 | node = node && node[key]; |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | const splitScope = (scope: string): string[] => (scope ? scope.split('.') : []); |
| 50 |
no test coverage detected