MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / encode

Function encode

scripts/createInvisibleText.js:249–253  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

247 return PADDING_START + res.join("") + PADDING_END;
248};
249export const encode = (text) => {
250 let matches = shouldEncodePattern.exec(text);
251 if (!matches) return text;
252 return text.replace(shouldEncodePattern, " " + _encode(matches[1]));
253};
254const decodeChar = (encodedChar) => {
255 encodedChar = encodedChar.reverse();
256 let curr = 1;

Callers 1

doEncodeFunction · 0.85

Calls 3

_encodeFunction · 0.85
replaceMethod · 0.80
execMethod · 0.45

Tested by

no test coverage detected