(str: string)
| 15 | } |
| 16 | |
| 17 | export function stringToUint8Array(str: string) { |
| 18 | const encoder = new TextEncoder(); |
| 19 | return encoder.encode(str); |
| 20 | } |
| 21 | |
| 22 | export function uint8ArrayToString(arr: Uint8Array) { |
| 23 | const decoder = new TextDecoder(); |
no test coverage detected