(connectionString: string | string[])
| 214 | export const processTick = () => new Promise(resolve => setTimeout(resolve, 0)); |
| 215 | |
| 216 | export function getIndicesOfAuthInUrl(connectionString: string | string[]) { |
| 217 | const doubleSlashIndex = connectionString.indexOf('//'); |
| 218 | const atIndex = connectionString.indexOf('@'); |
| 219 | |
| 220 | if (doubleSlashIndex === -1 || atIndex === -1) { |
| 221 | return null; |
| 222 | } |
| 223 | |
| 224 | return { |
| 225 | start: doubleSlashIndex + 2, |
| 226 | end: atIndex |
| 227 | }; |
| 228 | } |
| 229 | |
| 230 | export function removeAuthFromConnectionString(connectionString: string) { |
| 231 | const indices = getIndicesOfAuthInUrl(connectionString); |
no outgoing calls
no test coverage detected