(str: string)
| 661 | const QUOTED_INDEX_REGEX = /^(\[(\d+)\])$/ |
| 662 | |
| 663 | const parseQuotedIndex = (str: string): Option.Option<number> => { |
| 664 | const match = str.match(QUOTED_INDEX_REGEX) |
| 665 | if (match !== null) { |
| 666 | const matchedIndex = match[2] |
| 667 | return pipe( |
| 668 | matchedIndex !== undefined && matchedIndex.length > 0 ? |
| 669 | Option.some(matchedIndex) : |
| 670 | Option.none(), |
| 671 | Option.flatMap(parseInteger) |
| 672 | ) |
| 673 | } |
| 674 | return Option.none() |
| 675 | } |
| 676 | |
| 677 | const splitIndexInKeys = ( |
| 678 | map: Map<string, string>, |