(compositeKey: string)
| 37 | // - 'feature.geometry.type' => ['feature', 'geometry', 'type'] |
| 38 | // - 'feature' => ['feature'] |
| 39 | function getKeys(compositeKey: string): string[] { |
| 40 | if (typeof compositeKey === 'string') { |
| 41 | // else assume string and split around dots |
| 42 | let keyList = keyMap[compositeKey]; |
| 43 | if (!keyList) { |
| 44 | keyList = compositeKey.split('.'); |
| 45 | keyMap[compositeKey] = keyList; |
| 46 | } |
| 47 | return keyList; |
| 48 | } |
| 49 | // Wrap in array if needed |
| 50 | return Array.isArray(compositeKey) ? compositeKey : [compositeKey]; |
| 51 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…