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

Function utf8PercentEncodeCodePointInternal

out/cli.cjs:3544–3555  ·  view source on GitHub ↗
(codePoint, percentEncodePredicate)

Source from the content-addressed store, hash-verified

3542 return isComponentPercentEncode(c4) || extraURLEncodedPercentEncodeSet.has(c4);
3543 }
3544 function utf8PercentEncodeCodePointInternal(codePoint, percentEncodePredicate) {
3545 const bytes = utf8Encode(codePoint);
3546 let output = "";
3547 for (const byte of bytes) {
3548 if (!percentEncodePredicate(byte)) {
3549 output += String.fromCharCode(byte);
3550 } else {
3551 output += percentEncode(byte);
3552 }
3553 }
3554 return output;
3555 }
3556 function utf8PercentEncodeCodePoint(codePoint, percentEncodePredicate) {
3557 return utf8PercentEncodeCodePointInternal(String.fromCodePoint(codePoint), percentEncodePredicate);
3558 }

Callers 2

utf8PercentEncodeStringFunction · 0.85

Calls 2

utf8EncodeFunction · 0.85
percentEncodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…