MCPcopy
hub / github.com/di-sukharev/opencommit / ucs2decode

Function ucs2decode

out/cli.cjs:2909–2928  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

2907 return result + encoded;
2908 }
2909 function ucs2decode(string) {
2910 const output = [];
2911 let counter = 0;
2912 const length = string.length;
2913 while (counter < length) {
2914 const value = string.charCodeAt(counter++);
2915 if (value >= 55296 && value <= 56319 && counter < length) {
2916 const extra = string.charCodeAt(counter++);
2917 if ((extra & 64512) == 56320) {
2918 output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
2919 } else {
2920 output.push(value);
2921 counter--;
2922 }
2923 } else {
2924 output.push(value);
2925 }
2926 }
2927 return output;
2928 }
2929 var ucs2encode = (codePoints) => String.fromCodePoint(...codePoints);
2930 var basicToDigit = function(codePoint) {
2931 if (codePoint >= 48 && codePoint < 58) {

Callers 1

encode3Function · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…