( apiKey: string, noBearer: boolean = false, )
| 229 | } |
| 230 | |
| 231 | export function getBearerToken( |
| 232 | apiKey: string, |
| 233 | noBearer: boolean = false, |
| 234 | ): string { |
| 235 | return validString(apiKey) |
| 236 | ? `${noBearer ? "" : "Bearer "}${apiKey.trim()}` |
| 237 | : ""; |
| 238 | } |
| 239 | |
| 240 | export function validString(x: string): boolean { |
| 241 | return x?.length > 0; |
no test coverage detected