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

Function utf8PercentEncodeString

out/cli.cjs:3559–3569  ·  view source on GitHub ↗
(input, percentEncodePredicate, spaceAsPlus = false)

Source from the content-addressed store, hash-verified

3557 return utf8PercentEncodeCodePointInternal(String.fromCodePoint(codePoint), percentEncodePredicate);
3558 }
3559 function utf8PercentEncodeString(input, percentEncodePredicate, spaceAsPlus = false) {
3560 let output = "";
3561 for (const codePoint of input) {
3562 if (spaceAsPlus && codePoint === " ") {
3563 output += "+";
3564 } else {
3565 output += utf8PercentEncodeCodePointInternal(codePoint, percentEncodePredicate);
3566 }
3567 }
3568 return output;
3569 }
3570 module2.exports = {
3571 isC0ControlPercentEncode,
3572 isFragmentPercentEncode,

Callers 3

parseOpaqueHostFunction · 0.85
serializeUrlencodedFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…