(str: string)
| 640 | const QUOTED_INDEX_REGEX = /^(\[(\d+)\])$/ |
| 641 | |
| 642 | const parseQuotedIndex = (str: string): Option.Option<number> => { |
| 643 | const match = str.match(QUOTED_INDEX_REGEX) |
| 644 | if (match !== null) { |
| 645 | const matchedIndex = match[2] |
| 646 | return pipe( |
| 647 | matchedIndex !== undefined && matchedIndex.length > 0 ? |
| 648 | Option.some(matchedIndex) : |
| 649 | Option.none(), |
| 650 | Option.flatMap(parseInteger) |
| 651 | ) |
| 652 | } |
| 653 | return Option.none() |
| 654 | } |
| 655 | |
| 656 | const splitIndexInKeys = ( |
| 657 | map: Map<string, string>, |