MCPcopy Index your code
hub / github.com/OneNoteDev/WebClipper / decodeCodePointsArray

Function decodeCodePointsArray

lib/sanitize-html.js:1591–1607  ·  view source on GitHub ↗
(codePoints)

Source from the content-addressed store, hash-verified

1589var MAX_ARGUMENTS_LENGTH = 0x1000
1590
1591function decodeCodePointsArray (codePoints) {
1592 var len = codePoints.length
1593 if (len <= MAX_ARGUMENTS_LENGTH) {
1594 return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
1595 }
1596
1597 // Decode in chunks to avoid "call stack size exceeded".
1598 var res = ''
1599 var i = 0
1600 while (i < len) {
1601 res += String.fromCharCode.apply(
1602 String,
1603 codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
1604 )
1605 }
1606 return res
1607}
1608
1609function asciiSlice (buf, start, end) {
1610 var ret = ''

Callers 1

utf8SliceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected