()
| 246 | // ============================================================================ |
| 247 | |
| 248 | const utf8ToBytes = () => |
| 249 | z.codec(z.string(), z.instanceof(Uint8Array), { |
| 250 | decode: (str) => new TextEncoder().encode(str), |
| 251 | encode: (bytes) => new TextDecoder().decode(bytes), |
| 252 | }); |
| 253 | |
| 254 | test("utf8ToBytes codec", () => { |
| 255 | const codec = utf8ToBytes(); |
no test coverage detected