{"id":50901691,"url":"https://github.com/didrod205/checkdigit","last_synced_at":"2026-06-16T03:04:41.728Z","repository":{"id":361572041,"uuid":"1254975381","full_name":"didrod205/checkdigit","owner":"didrod205","description":"Validate \u0026 generate checksummed IDs — credit cards (Luhn), IBANs (mod-97), ISBN-10/13, EAN/UPC barcodes. Exact check-digit math, zero deps, 100% local. Web app + library.","archived":false,"fork":false,"pushed_at":"2026-05-31T08:33:34.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T10:13:52.002Z","etag":null,"topics":["barcode","check-digit","checksum","credit-card","ean13","iban","isbn","luhn","validation","zero-dependency"],"latest_commit_sha":null,"homepage":"https://didrod205.github.io/checkdigit/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/didrod205.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["https://elab-studio.lemonsqueezy.com/checkout/buy/5d059b89-51d0-456b-b33a-ed56994f7010"]}},"created_at":"2026-05-31T08:32:03.000Z","updated_at":"2026-05-31T09:18:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/didrod205/checkdigit","commit_stats":null,"previous_names":["didrod205/checkdigit"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/didrod205/checkdigit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didrod205%2Fcheckdigit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didrod205%2Fcheckdigit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didrod205%2Fcheckdigit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didrod205%2Fcheckdigit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/didrod205","download_url":"https://codeload.github.com/didrod205/checkdigit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didrod205%2Fcheckdigit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34388682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barcode","check-digit","checksum","credit-card","ean13","iban","isbn","luhn","validation","zero-dependency"],"created_at":"2026-06-16T03:04:41.654Z","updated_at":"2026-06-16T03:04:41.714Z","avatar_url":"https://github.com/didrod205.png","language":"TypeScript","funding_links":["https://elab-studio.lemonsqueezy.com/checkout/buy/5d059b89-51d0-456b-b33a-ed56994f7010"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# ✅ checkdigit\n\n### Validate \u0026 generate checksummed IDs — cards, IBANs, ISBNs, barcodes. Locally.\n\n[![npm version](https://img.shields.io/npm/v/@didrod2539/checkdigit.svg?color=success)](https://www.npmjs.com/package/@didrod2539/checkdigit)\n[![bundle size](https://img.shields.io/bundlephobia/minzip/@didrod2539/checkdigit?label=gzip)](https://bundlephobia.com/package/@didrod2539/checkdigit)\n[![CI](https://github.com/didrod205/checkdigit/actions/workflows/ci.yml/badge.svg)](https://github.com/didrod205/checkdigit/actions/workflows/ci.yml)\n[![types](https://img.shields.io/npm/types/@didrod2539/checkdigit.svg)](https://www.npmjs.com/package/@didrod2539/checkdigit)\n[![license](https://img.shields.io/npm/l/@didrod2539/checkdigit.svg)](./LICENSE)\n\n**[🌐 Try the free web app →](https://didrod205.github.io/checkdigit/)** \u0026nbsp;·\u0026nbsp; paste an ID to validate, or generate test data. Nothing leaves the page.\n\n\u003c/div\u003e\n\n---\n\nCredit cards, bank accounts (IBAN), books (ISBN) and products (EAN/UPC barcodes)\nall carry a **check digit** — a number computed from the rest so typos can be\ncaught instantly. The math (Luhn, mod-97, weighted sums) is exact and well-defined…\nand exactly the kind of thing that's tedious to implement per-format and easy for\nan AI to get subtly wrong.\n\n**checkdigit** validates and generates all of them with the correct algorithms,\n**zero dependencies**, and **100% locally** — your card number never touches a\nserver.\n\n\u003e 📸 _Screenshot / demo GIF:_ `./web/screenshot.png` — record the [live app](https://didrod205.github.io/checkdigit/) validating a card and generating a test EAN-13.\n\n## Why it exists\n\n- **AI can't reliably do this.** Check-digit algorithms (Luhn doubling, IBAN\n  mod-97-10, ISBN/EAN weighted sums) are precise and unforgiving — an LLM will\n  cheerfully produce an \"almost right\" number that fails validation. You want a\n  tested, deterministic implementation.\n- **Privacy.** Validating a card on a random website means typing your number\n  into their server. checkdigit runs on your device.\n- **One tool, every format.** Stop pulling a separate micro-library (or\n  copy-pasted snippet) for each of Luhn / IBAN / ISBN / EAN.\n\n## Who it's for\n\n**Developers** (form validation without N tiny deps), **QA \u0026 testers** (generate\nvalid test cards/IBANs/barcodes), **e-commerce \u0026 ops** (verify SKUs, orders,\nbarcodes), **finance**, **publishers/librarians** (ISBN), and anyone who needs to\ncheck or convert an identifier.\n\n## Install\n\n**No install —** just open the **[web app](https://didrod205.github.io/checkdigit/)**.\n\n**Command line:**\n\n```bash\nnpx @didrod2539/checkdigit validate 4111111111111111   # ✓ valid  credit-card (Visa)\necho \"DE89 3704 0044 0532 0130 00\" | npx @didrod2539/checkdigit validate\nnpx @didrod2539/checkdigit generate card --brand Amex  # a format-valid TEST card\n```\n\n**Library:**\n\n```bash\nnpm install @didrod2539/checkdigit\n```\n\nZero runtime dependencies. ESM + CJS + TypeScript types. Runs in the browser, Node, Deno and Bun.\n\n## CLI\n\n```bash\ncheckdigit validate \u003cid\u003e     # auto-detect (card/IBAN/ISBN/barcode) + validate\ncheckdigit generate \u003ckind\u003e   # make format-valid TEST data\n```\n\n`validate` exits non-zero on an invalid check digit — handy in scripts. Generate\nkinds: `card` (`--brand`), `isbn`, `barcode` (`--type`), `luhn` (`--length`).\nGenerated values are **test data** (correct checksum) — not real accounts.\n\n## Usage\n\n```ts\nimport { validate, detect, luhn, creditCard, iban, isbn, barcode } from \"@didrod2539/checkdigit\";\n\n// Auto-detect \u0026 validate anything\nvalidate(\"4111 1111 1111 1111\"); // { type: \"credit-card\", valid: true, detail: \"Visa\" }\nvalidate(\"DE89 3704 0044 0532 0130 00\"); // { type: \"iban\", valid: true, detail: \"DE\" }\nvalidate(\"978-0-306-40615-7\");   // { type: \"isbn\", valid: true, detail: \"ISBN-13\" }\n\n// Or use a specific module\ncreditCard.brand(\"378282246310005\");      // \"American Express\"\ncreditCard.generateTest(\"Visa\");           // a Luhn-valid test number\niban.isValid(\"GB82 WEST 1234 5698 7654 32\"); // true\nisbn.to13(\"0306406152\");                    // \"9780306406157\"\nbarcode.isValid(\"036000291452\");            // true (UPC-A)\nluhn.complete(\"7992739871\");                // \"79927398713\"\n```\n\n## What's covered\n\n| Module | Identifiers |\n| ------ | ----------- |\n| `luhn` | Mod-10 (cards, IMEI…): validate, check digit, complete, generate |\n| `creditCard` | Brand detection, validation, formatting, **test-number generation** |\n| `iban` | ISO 13616 mod-97-10: validate, check digits, format, country |\n| `isbn` | ISBN-10 \u0026 ISBN-13: validate, check digits, **convert 10 ⇄ 13** |\n| `barcode` | EAN-13, EAN-8, UPC-A: validate, check digit, generate |\n| `detect` / `validate` | Auto-detect the type and validate in one call |\n\n## FAQ\n\n**Is my card number sent anywhere?**\nNo. Everything runs on your device — no server, no telemetry, works offline.\n\n**Are the generated card numbers real?**\nNo. They're **format-valid test numbers** (correct brand prefix, length and Luhn\ncheck) for testing forms and payment flows — they are not real, usable accounts.\n\n**Does validating a card mean it will work for a payment?**\nNo — it only confirms the number is *structurally* valid (right format + check\ndigit). Whether an account exists/has funds is a separate, server-side matter.\n\n**Which IBAN countries are supported?**\nAny IBAN — validation uses the universal mod-97-10 check plus the general\nstructure. (Per-country length tables can be added; PRs welcome.)\n\n**Can I add VIN / routing numbers / ISIN?**\nYes please — see CONTRIBUTING; each is a small module with its own check.\n\n## Contributing\n\nContributions welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md) and the\n[Code of Conduct](./CODE_OF_CONDUCT.md).\n\n```bash\ngit clone https://github.com/didrod205/checkdigit.git\ncd checkdigit\nnpm install\nnpm test          # run the suite\nnpm run dev       # run the web app locally\n```\n\n## 💖 Sponsor\n\ncheckdigit is free, MIT-licensed, and built in spare time. If it saved you a\ndependency (or a debugging session), please consider supporting it:\n\n- ⭐ **Star this repo** — free, and it genuinely helps others find it.\n- 🍋 **[Sponsor via Lemon Squeezy](https://elab-studio.lemonsqueezy.com/checkout/buy/5d059b89-51d0-456b-b33a-ed56994f7010)** — one-time or recurring support.\n\n**Where your support goes:** more identifiers (VIN, routing/ABA, ISIN, NPI,\nnational IDs), per-country IBAN structure validation, more card brands, a CLI,\nkeeping the free web app online, and fast issue responses.\n\n## License\n\n[MIT](./LICENSE) © checkdigit contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidrod205%2Fcheckdigit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdidrod205%2Fcheckdigit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidrod205%2Fcheckdigit/lists"}