(k: string, v: string)
| 434 | // strings handles escaping so the count matches what axios serializes. |
| 435 | const EMPTY_BODY_BYTES = Buffer.byteLength('{"entries":{}}', 'utf8') |
| 436 | const entryBytes = (k: string, v: string): number => |
| 437 | Buffer.byteLength(jsonStringify(k), 'utf8') + |
| 438 | Buffer.byteLength(jsonStringify(v), 'utf8') + |
| 439 | 2 // colon + comma (comma over-counts by 1 on the last entry; harmless slack) |
| 440 | |
| 441 | const batches: Array<Record<string, string>> = [] |
| 442 | let current: Record<string, string> = {} |
no test coverage detected