MCPcopy Create free account
hub / github.com/esmBot/esmBot / textEncode

Function textEncode

src/utils/misc.ts:100–110  ·  view source on GitHub ↗
(string: string)

Source from the content-addressed store, hash-verified

98
99// textEncode(string) to encode characters for image processing
100export function textEncode(string: string) {
101 return string
102 .replaceAll("&", "&")
103 .replaceAll(">", ">")
104 .replaceAll("<", "&lt;")
105 .replaceAll('"', "&quot;")
106 .replaceAll("'", "&apos;")
107 .replaceAll("\\n", "\n")
108 .replaceAll("\\:", ":")
109 .replaceAll("\\,", ",");
110}
111
112const activityTypes = ["online", "dnd", "idle", "invisible"];
113

Callers 2

cleanMessageFunction · 0.85
cleanInteractionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected