UNPKG

knip

Version:

Find and fix unused dependencies, exports and files in your TypeScript and JavaScript projects

20 lines (19 loc) 516 B
const CLIENT_MAPPING = { pg: ['pg'], postgres: ['pg'], postgresql: ['pg'], mysql: ['mysql', 'mysql2'], mysql2: ['mysql2'], sqlite3: ['sqlite3'], 'better-sqlite3': ['better-sqlite3'], mssql: ['tedious'], tedious: ['tedious'], oracledb: ['oracledb'], oracle: ['oracledb'], cockroachdb: ['pg'], redshift: ['pg'], }; export const clientToPackages = (client) => { const normalizedClient = client.toLowerCase(); return CLIENT_MAPPING[normalizedClient] ?? []; };