( url: string = '', settings: ISettings, )
| 4 | import type { ISettings, IWebProps, INavProps } from '../types' |
| 5 | |
| 6 | export function replaceJsdelivrCDN( |
| 7 | url: string = '', |
| 8 | settings: ISettings, |
| 9 | ): string { |
| 10 | const cdn = settings?.gitHubCDN |
| 11 | if (!cdn) { |
| 12 | return url |
| 13 | } |
| 14 | url = url.replace('cdn.jsdelivr.net', cdn) |
| 15 | url = url.replace('testingcf.jsdelivr.net', cdn) |
| 16 | url = url.replace('img.jsdmirror.com', cdn) |
| 17 | url = url.replace('gcore.jsdelivr.net', cdn) |
| 18 | return url |
| 19 | } |
| 20 | |
| 21 | export function getIsGitee(gitRepoUrl: string): boolean { |
| 22 | return gitRepoUrl.includes('gitee.com') |
no outgoing calls
no test coverage detected