(str)
| 172 | * @returns {number} |
| 173 | */ |
| 174 | export function byteCount(str) { |
| 175 | return encodeURI(str).split(/%..|./).length - 1; |
| 176 | } |
| 177 | |
| 178 | export function ab2str(buf) { |
| 179 | const ab = new Uint8Array(buf); |
no outgoing calls
no test coverage detected