MCPcopy Create free account
hub / github.com/cxapython/catvm / $

Function $

xiaohongshu/test.js:1632–1679  ·  view source on GitHub ↗
(e, t)

Source from the content-addressed store, hash-verified

1630 return e < 16 ? "0" + e.toString(16) : e.toString(16)
1631 }
1632 function $(e, t) {
1633 var n;
1634 t = t || 1 / 0;
1635 for (var r = e.length, i = null, o = [], a = 0; a < r; ++a) {
1636 if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
1637 if (!i) {
1638 if (n > 56319) {
1639 (t -= 3) > -1 && o.push(239, 191, 189);
1640 continue
1641 }
1642 if (a + 1 === r) {
1643 (t -= 3) > -1 && o.push(239, 191, 189);
1644 continue
1645 }
1646 i = n;
1647 continue
1648 }
1649 if (n < 56320) {
1650 (t -= 3) > -1 && o.push(239, 191, 189),
1651 i = n;
1652 continue
1653 }
1654 n = 65536 + (i - 55296 << 10 | n - 56320)
1655 } else
1656 i && (t -= 3) > -1 && o.push(239, 191, 189);
1657 if (i = null,
1658 n < 128) {
1659 if ((t -= 1) < 0)
1660 break;
1661 o.push(n)
1662 } else if (n < 2048) {
1663 if ((t -= 2) < 0)
1664 break;
1665 o.push(n >> 6 | 192, 63 & n | 128)
1666 } else if (n < 65536) {
1667 if ((t -= 3) < 0)
1668 break;
1669 o.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
1670 } else {
1671 if (!(n < 1114112))
1672 throw new Error("Invalid code point");
1673 if ((t -= 4) < 0)
1674 break;
1675 o.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128)
1676 }
1677 }
1678 return o
1679 }
1680 function W(e) {
1681 return r.toByteArray(function(e) {
1682 if ((e = function(e) {

Callers 4

pFunction · 0.70
wFunction · 0.70
test.jsFile · 0.70
hFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected