(streamerKey: string)
| 79 | } |
| 80 | |
| 81 | function 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 | |
| 88 | function isKnownPlatform(platform: string): platform is Platform { |
| 89 | return platform === "DOUYU" || platform === "DOUYIN" || platform === "HUYA" || platform === "BILIBILI"; |
no outgoing calls
no test coverage detected