MCPcopy
hub / github.com/chen-zeong/DTV / normalizeStreamerKey

Function normalizeStreamerKey

web/src/state/follow/FollowProvider.tsx:81–86  ·  view source on GitHub ↗
(streamerKey: string)

Source from the content-addressed store, hash-verified

79}
80
81function normalizeStreamerKey(streamerKey: string) {
82 const [rawPlatform, rawId] = String(streamerKey || "").split(":");
83 const platform = String(rawPlatform || "").toUpperCase();
84 const id = String(rawId || "");
85 return { platform, id, key: `${platform}:${id}` };
86}
87
88function isKnownPlatform(platform: string): platform is Platform {
89 return platform === "DOUYU" || platform === "DOUYIN" || platform === "HUYA" || platform === "BILIBILI";

Callers 2

normalizeListOrderFunction · 0.70
FollowProviderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected