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

Function mapChars

out/cli.cjs:3184–3214  ·  view source on GitHub ↗
(domainName, { transitionalProcessing })

Source from the content-addressed store, hash-verified

3182 return null;
3183 }
3184 function mapChars(domainName, { transitionalProcessing }) {
3185 let processed = "";
3186 for (const ch of domainName) {
3187 const [status, mapping] = findStatus(ch.codePointAt(0));
3188 switch (status) {
3189 case STATUS_MAPPING.disallowed:
3190 processed += ch;
3191 break;
3192 case STATUS_MAPPING.ignored:
3193 break;
3194 case STATUS_MAPPING.mapped:
3195 if (transitionalProcessing && ch === "\u1E9E") {
3196 processed += "ss";
3197 } else {
3198 processed += mapping;
3199 }
3200 break;
3201 case STATUS_MAPPING.deviation:
3202 if (transitionalProcessing) {
3203 processed += mapping;
3204 } else {
3205 processed += ch;
3206 }
3207 break;
3208 case STATUS_MAPPING.valid:
3209 processed += ch;
3210 break;
3211 }
3212 }
3213 return processed;
3214 }
3215 function validateLabel(label, {
3216 checkHyphens,
3217 checkBidi,

Callers 1

processingFunction · 0.85

Calls 1

findStatusFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…