(value: unknown, maxBytes: number, label: string)
| 1228 | } |
| 1229 | |
| 1230 | function assertJsonByteLimit(value: unknown, maxBytes: number, label: string): void { |
| 1231 | if (Buffer.byteLength(JSON.stringify(value), 'utf8') > maxBytes) { |
| 1232 | throw invalidProtocolFrame(`${label} exceeds byte limit`); |
| 1233 | } |
| 1234 | } |
no test coverage detected