(ks: string | string[])
| 3 | // ensure the keys being passed is an array of key paths |
| 4 | // example: 'a.b' becomes ['a', 'b'] unless it was already ['a', 'b'] |
| 5 | const keys = (ks: string | string[]) => (Array.isArray(ks) ? ks : ks.split('.')) |
| 6 | |
| 7 | // traverse the set of keys left to right, |
| 8 | // returning the current value in each iteration. |