(value)
| 342 | |
| 343 | |
| 344 | function encodeText(value) { |
| 345 | // deno-lint-ignore valid-typeof |
| 346 | if (typeof TextEncoder == UNDEFINED_TYPE) { |
| 347 | value = unescape(encodeURIComponent(value)); |
| 348 | const result = new Uint8Array(value.length); |
| 349 | for (let i = 0; i < result.length; i++) { |
| 350 | result[i] = value.charCodeAt(i); |
| 351 | } |
| 352 | return result; |
| 353 | } else { |
| 354 | return new TextEncoder().encode(value); |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | // Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl |
| 359 |
no outgoing calls
no test coverage detected
searching dependent graphs…