(vals: Uint8Array[])
| 51 | export {segment_util}; |
| 52 | |
| 53 | export function fromUint8ToStringArray(vals: Uint8Array[]) { |
| 54 | try { |
| 55 | // Decode the bytes into string. |
| 56 | return vals.map(val => decodeString(val)); |
| 57 | } catch (err) { |
| 58 | throw new Error( |
| 59 | `Failed to decode encoded string bytes into utf-8, error: ${err}`); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | export function fromStringArrayToUint8(strings: string[]) { |
| 64 | return strings.map(s => encodeString(s)); |
nothing calls this directly
no test coverage detected
searching dependent graphs…