(value, prefix = '')
| 70 | } |
| 71 | |
| 72 | function flattenKeys(value, prefix = '') { |
| 73 | if (value == null || typeof value !== 'object' || Array.isArray(value)) { |
| 74 | return prefix ? [prefix] : []; |
| 75 | } |
| 76 | |
| 77 | return Object.entries(value) |
| 78 | .flatMap(([key, child]) => flattenKeys(child, prefix ? `${prefix}.${key}` : key)) |
| 79 | .sort(); |
| 80 | } |
| 81 | |
| 82 | function getValueByPath(value, dottedPath) { |
| 83 | return dottedPath.split('.').reduce((current, segment) => ( |
no outgoing calls
no test coverage detected