MCPcopy Index your code
hub / github.com/feross/buffer / decodeCodePointsArray

Function decodeCodePointsArray

index.js:1033–1049  ·  view source on GitHub ↗
(codePoints)

Source from the content-addressed store, hash-verified

1031const MAX_ARGUMENTS_LENGTH = 0x1000
1032
1033function 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
1051function asciiSlice (buf, start, end) {
1052 let ret = ''

Callers 1

utf8SliceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…