belgattitude/httpx

View on GitHub
packages/dsn-parser/src/convert-jdbc-to-dsn.ts

Summary

Maintainability
A
0 mins
Test Coverage
export const convertJdbcToDsn = (jdbc: string): string => {
  const [part1, ...rest] = jdbc.split(';');
  return [part1, rest ? rest.join('&') : undefined].filter(Boolean).join('?');
};