Skip to content

feat(dev): Compare Two Lists — line set operations - #150

Merged
slaveofcode merged 2 commits into
developfrom
feat/dev-compare-lists
Aug 3, 2026
Merged

feat(dev): Compare Two Lists — line set operations#150
slaveofcode merged 2 commits into
developfrom
feat/dev-compare-lists

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

What

New Compare Two Lists tool (Dev) — paste two line-lists and combine them with six set operations in one tool:

  • Merge & dedupe (A ∪ B)
  • In A, not in B (A − B)
  • In B, not in A (B − A)
  • Common to both (A ∩ B)
  • In only one (A △ B, symmetric difference)
  • Duplicates (lines appearing 2+ times across both)

Options: ignore case, trim whitespace, ignore blank lines, sort. Plus swap A/B, copy, and download .txt. Fully client-side — nothing uploaded.

Covers the three originally requested operations (merge+dedupe, subtract, find common) and adds the related ones you asked me to include.

Details

  • src/tools/dev/lineset.lib.ts — pure compareLines(a, b, mode, opts); comparison on a normalised key (trim + case-fold) while preserving each line's original text; 17 unit tests
  • src/islands/dev/CompareLists.tsx — thin island, live useMemo result
  • Registered compare-lists (beta); EN + ID SEO + OG
  • 692 tests pass · 0 lint errors · build green (/tools/compare-lists + /id/...)

🤖 Generated with Claude Code

slaveofcode and others added 2 commits August 3, 2026 14:43
Promote to production: DOCX to PDF converter
One tool with six line/list set operations between two sources: merge &
dedupe (union), in A not B, in B not A, common to both (intersection),
in only one (symmetric difference), and duplicates (2+ across both).
Options: ignore case, trim whitespace, ignore blank lines, sort. Swap
A/B, copy, download .txt. Runs entirely in the browser.

Comparison uses a normalised key (trim + case-fold) while preserving each
line's original text (first occurrence wins). Pure lib with 17 unit tests.
Bilingual (EN + ID) UI, SEO and OG.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ubfx4XocHcECaL8twp9zsr
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
goodwebtools 028cecd Aug 03 2026, 09:14 AM

@slaveofcode
slaveofcode merged commit 82b671f into develop Aug 3, 2026
2 checks passed
@slaveofcode
slaveofcode deleted the feat/dev-compare-lists branch August 3, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant