Skip to content

Commit 777b9be

Browse files
feat(shared): add isSupportedPlatform helper
1 parent 0e8ebf5 commit 777b9be

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/shared/src/platforms.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,3 +292,8 @@ export function getDeepLinkUrl(platformId: string, username: string): string | n
292292
if (!platform?.deepLinkPattern) return null;
293293
return platform.deepLinkPattern.replace(/{username}/g, username);
294294
}
295+
296+
/** Check if a platform ID is supported */
297+
export function isSupportedPlatform(id: string): boolean {
298+
return id in PLATFORMS;
299+
}

0 commit comments

Comments
 (0)