(name: string)
| 5 | export type Library = 'react-spectrum' | 'react-aria'; |
| 6 | |
| 7 | export function getLibraryFromUrl(name: string): Library { |
| 8 | if (name.startsWith('react-aria/')) { |
| 9 | return 'react-aria'; |
| 10 | } |
| 11 | if (name.startsWith('s2/')) { |
| 12 | return 'react-spectrum'; |
| 13 | } |
| 14 | return 'react-spectrum'; |
| 15 | } |
| 16 | |
| 17 | export function getLibraryFromPage(page: {name: string}): Library { |
| 18 | return getLibraryFromUrl(page.name); |
no outgoing calls
no test coverage detected