(what: string, s: string)
| 2508 | } |
| 2509 | |
| 2510 | const checkChars = (what: string, s: string): void => { |
| 2511 | const invalid = searchInvalid(s) |
| 2512 | if (invalid !== -1) { |
| 2513 | const code = s.codePointAt(invalid)!.toString(16).toUpperCase().padStart(4, "0") |
| 2514 | throw invalidEvent(`${what} contains the invalid character U+${code}`) |
| 2515 | } |
| 2516 | } |
| 2517 | |
| 2518 | const checkName = (what: string, name: string): void => { |
| 2519 | if (typeof name !== "string" || !isName(name)) throw invalidEvent(`invalid ${what} ${JSON.stringify(name)}`) |
no test coverage detected