MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / sanitizeInput

Function sanitizeInput

src/utils/validation.js:138–145  ·  view source on GitHub ↗
(input, maxLength = 2000)

Source from the content-addressed store, hash-verified

136}
137
138export function sanitizeInput(input, maxLength = 2000) {
139 if (typeof input !== 'string') return '';
140
141 return input
142 .trim()
143 .substring(0, maxLength)
144 .replace(/[\x00-\x1F\x7F]/g, '');
145}
146
147export function sanitizeMention(mention) {
148 const validId = mention.replace(/[<@!&#]/g, '');

Callers 3

handleAddNoteFunction · 0.90
sanitizeVoiceChannelNameFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected