mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-24 23:57:49 +00:00
9 lines
322 B
TypeScript
9 lines
322 B
TypeScript
export function buildSelectedTablesPayload(allTables: string[], selectedTables: string[]): string[] | undefined {
|
|
if (allTables.length > 0 && selectedTables.length === allTables.length) {
|
|
return undefined;
|
|
}
|
|
|
|
const selected = new Set(selectedTables);
|
|
return allTables.filter((table) => selected.has(table));
|
|
}
|