mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-30 00:19:35 +00:00
11 lines
323 B
TypeScript
11 lines
323 B
TypeScript
export function prunePinnedTreeNodeIdsForConnection(ids: Set<string>, connectionId: string): Set<string> {
|
|
const next = new Set<string>();
|
|
const prefix = `${connectionId}:`;
|
|
for (const id of ids) {
|
|
if (id === connectionId) continue;
|
|
if (id.startsWith(prefix)) continue;
|
|
next.add(id);
|
|
}
|
|
return next;
|
|
}
|