(source: string, pointer: string)
| 1579 | } |
| 1580 | |
| 1581 | const patternSchemaOf = (source: string, pointer: string) => { |
| 1582 | try { |
| 1583 | new RegExp(source, "u") |
| 1584 | } catch { |
| 1585 | return throwParseError( |
| 1586 | writeInvalidKeywordMessage(pointer, "a valid pattern", source) |
| 1587 | ) |
| 1588 | } |
| 1589 | const flags = flagsOf(source) |
| 1590 | return flags ? { rule: source, flags } : { rule: source } |
| 1591 | } |
| 1592 | |
| 1593 | type KeyBudget = { |
| 1594 | remaining: number |
no test coverage detected