MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / normalizeId

Function normalizeId

biko/biko.ts:81–95  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

79 return normalizeId(
80 maybeValue.userId ??
81 maybeValue.channelId ??
82 maybeValue.chatId ??
83 maybeValue.value ??
84 "",
85 );
86 }
87 return String(value);
88}
89
90function normalizeUsername(value: string): string {
91 return value.trim().replace(/^@+/, "").toLowerCase();
92}
93
94function formatDateParts(input: unknown): { day: string; time: string } {
95 let date: Date;
96 if (input instanceof Date) {
97 date = input;
98 } else if (typeof input === "number") {

Callers 2

resolveSourceUserFunction · 0.70
matchesManualSelectorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected