decord/alpha/source/modules/channel/sanitizeGuildTextChannelName.tsx

18 lines
541 B
TypeScript
Raw Permalink Normal View History

2026-10-10 08:08:14 +00:00
// Module ID: 5423
// Function ID: 5424
2026-07-20 16:05:17 +00:00
// Name: sanitizeGuildTextChannelName
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-10-10 08:08:14 +00:00
// Module 5423 (sanitizeGuildTextChannelName)
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
const result = size.fileFinishedImporting("modules/channel/sanitizeGuildTextChannelName.tsx");
2026-07-20 16:05:17 +00:00
export default function sanitizeGuildTextChannelName(str) {
str = str.replace(/[\s-~]+/g, "-");
2026-10-03 08:58:59 +00:00
const str2 = str.replace(/^-+/, "");
const str3 = str2.replace(/[\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, "");
return str3.toLowerCase();
2026-07-20 16:05:17 +00:00
};