MCPcopy Create free account
hub / github.com/UI5/webcomponents / decodeCodePointsArray

Function decodeCodePointsArray

packages/main/test/pages/diffable-html.js:1098–1114  ·  view source on GitHub ↗
(codePoints)

Source from the content-addressed store, hash-verified

1096 var MAX_ARGUMENTS_LENGTH = 0x1000
1097
1098 function decodeCodePointsArray (codePoints) {
1099 var len = codePoints.length
1100 if (len <= MAX_ARGUMENTS_LENGTH) {
1101 return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
1102 }
1103
1104 // Decode in chunks to avoid "call stack size exceeded".
1105 var res = ''
1106 var i = 0
1107 while (i < len) {
1108 res += String.fromCharCode.apply(
1109 String,
1110 codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
1111 )
1112 }
1113 return res
1114 }
1115
1116 function asciiSlice (buf, start, end) {
1117 var 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…