(keys: string[])
| 4 | // Bare keys may only contain ASCII letters, |
| 5 | // ASCII digits, underscores, and dashes (A-Za-z0-9_-). |
| 6 | function joinKeys(keys: string[]): string { |
| 7 | // Dotted keys are a sequence of bare or quoted keys joined with a dot. |
| 8 | // This allows for grouping similar properties together: |
| 9 | return keys |
| 10 | .map((str: string): string => { |
| 11 | return str.length === 0 || str.match(/[^A-Za-z0-9_-]/) |
| 12 | ? JSON.stringify(str) |
| 13 | : str; |
| 14 | }) |
| 15 | .join("."); |
| 16 | } |
| 17 | |
| 18 | type ArrayType = |
| 19 | | "ONLY_PRIMITIVE" |
no test coverage detected