platform.tsx 452 B

12345678910111213141516171819202122
  1. import {mobile} from 'sentry/data/platformCategories';
  2. export function isNativePlatform(platform: string | undefined) {
  3. switch (platform) {
  4. case 'cocoa':
  5. case 'objc':
  6. case 'native':
  7. case 'swift':
  8. case 'c':
  9. return true;
  10. default:
  11. return false;
  12. }
  13. }
  14. export function isMobilePlatform(platform: string | undefined) {
  15. if (!platform) {
  16. return false;
  17. }
  18. return ([...mobile] as string[]).includes(platform);
  19. }