(codePoints)
| 1031 | const MAX_ARGUMENTS_LENGTH = 0x1000 |
| 1032 | |
| 1033 | function decodeCodePointsArray (codePoints) { |
| 1034 | const len = codePoints.length |
| 1035 | if (len <= MAX_ARGUMENTS_LENGTH) { |
| 1036 | return String.fromCharCode.apply(String, codePoints) // avoid extra slice() |
| 1037 | } |
| 1038 | |
| 1039 | // Decode in chunks to avoid "call stack size exceeded". |
| 1040 | let res = '' |
| 1041 | let i = 0 |
| 1042 | while (i < len) { |
| 1043 | res += String.fromCharCode.apply( |
| 1044 | String, |
| 1045 | codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) |
| 1046 | ) |
| 1047 | } |
| 1048 | return res |
| 1049 | } |
| 1050 | |
| 1051 | function asciiSlice (buf, start, end) { |
| 1052 | let ret = '' |
no outgoing calls
no test coverage detected
searching dependent graphs…