( pathName: string, )
| 203 | } |
| 204 | |
| 205 | export const integrateCdnHost = ( |
| 206 | pathName: string, |
| 207 | ): string => { |
| 208 | if (!pathName) { |
| 209 | return pathName; |
| 210 | } |
| 211 | // TODO: delete this. Compatible with old version data |
| 212 | if (pathName.startsWith('http')) { |
| 213 | return pathName; |
| 214 | } |
| 215 | const host: string = getHostOfAttachment('QNY1', pathName); |
| 216 | return urlcat(host, pathName); |
| 217 | }; |
| 218 | |
| 219 | function startsWithIgnoreSlashPre(str: string, prefix: string): boolean { |
| 220 | if (str.startsWith(prefix)) { |
no test coverage detected