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

Function p

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

Source from the content-addressed store, hash-verified

713 return 0 | e
714 }
715 function p(e, t) {
716 if (u.isBuffer(e))
717 return e.length;
718 if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer))
719 return e.byteLength;
720 "string" != typeof e && (e = "" + e);
721 var n = e.length;
722 if (0 === n)
723 return 0;
724 for (var r = !1; ; )
725 switch (t) {
726 case "ascii":
727 case "latin1":
728 case "binary":
729 return n;
730 case "utf8":
731 case "utf-8":
732 case void 0:
733 return $(e).length;
734 case "ucs2":
735 case "ucs-2":
736 case "utf16le":
737 case "utf-16le":
738 return 2 * n;
739 case "hex":
740 return n >>> 1;
741 case "base64":
742 return W(e).length;
743 default:
744 if (r)
745 return $(e).length;
746 t = ("" + t).toLowerCase(),
747 r = !0
748 }
749 }
750 function v(e, t, n) {
751 var r = !1;
752 if ((void 0 === t || t < 0) && (t = 0),

Callers 7

cFunction · 0.70
test.jsFile · 0.70
vFunction · 0.70
gFunction · 0.70
yFunction · 0.70
mFunction · 0.70
bFunction · 0.70

Calls 7

$Function · 0.70
WFunction · 0.70
gFunction · 0.70
cFunction · 0.70
yFunction · 0.70
oFunction · 0.70
SFunction · 0.70

Tested by

no test coverage detected