(from: DsnLike)
| 156 | * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source |
| 157 | */ |
| 158 | export function makeDsn(from: DsnLike): DsnComponents | undefined { |
| 159 | const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from); |
| 160 | if (!components || !validateDsn(components)) { |
| 161 | return undefined; |
| 162 | } |
| 163 | return components; |
| 164 | } |
no test coverage detected