{"id":51570709,"url":"https://github.com/theaungmyatmoe/luhn","last_synced_at":"2026-07-10T19:03:11.287Z","repository":{"id":57097197,"uuid":"373675782","full_name":"theaungmyatmoe/luhn","owner":"theaungmyatmoe","description":"Luhn - Intuitive credit card numbers validator ","archived":false,"fork":false,"pushed_at":"2023-01-23T20:30:13.000Z","size":351,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-17T12:47:23.654Z","etag":null,"topics":["algorithms","credit-card","creditcard-validator","javascript","luhn","luhn-algorithm","typescript","validator"],"latest_commit_sha":null,"homepage":"https://amm834.github.io/luhn/","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/theaungmyatmoe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-04T00:20:43.000Z","updated_at":"2023-01-10T11:06:27.000Z","dependencies_parsed_at":"2023-02-12T15:45:58.302Z","dependency_job_id":null,"html_url":"https://github.com/theaungmyatmoe/luhn","commit_stats":null,"previous_names":["aungmyatmoethegreat/luhn","amm834/luhn"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/theaungmyatmoe/luhn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theaungmyatmoe%2Fluhn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theaungmyatmoe%2Fluhn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theaungmyatmoe%2Fluhn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theaungmyatmoe%2Fluhn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theaungmyatmoe","download_url":"https://codeload.github.com/theaungmyatmoe/luhn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theaungmyatmoe%2Fluhn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35339931,"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-07-10T02:00:06.465Z","response_time":60,"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":["algorithms","credit-card","creditcard-validator","javascript","luhn","luhn-algorithm","typescript","validator"],"created_at":"2026-07-10T19:03:10.568Z","updated_at":"2026-07-10T19:03:11.279Z","avatar_url":"https://github.com/theaungmyatmoe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Luhn Algorithm\n\n![npm download per month](https://img.shields.io/npm/dm/@amm834/luhn?style=plastic)\n![npm download per year](https://img.shields.io/npm/dy/@amm834/luhn?style=plastic)\n[![Lint and test](https://github.com/amm834/luhn/actions/workflows/test.yml/badge.svg)](https://github.com/amm834/luhn/actions/workflows/test.yml)\n![npm (scoped)](https://img.shields.io/npm/v/@amm834/luhn?logo=npm\u0026style=plastic)\n![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@amm834/luhn?logo=npm\u0026style=plastic)\n![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/amm834/luhn?include_prereleases\u0026style=plastic)\n![NPM](https://img.shields.io/npm/l/@amm834/luhn?style=plastic)\n\n[![@amm834/luhn](https://snyk.io/advisor/npm-package/@amm834/luhn/badge.svg)](https://snyk.io/advisor/npm-package/@amm834/luhn)\n![Libraries.io dependency status for latest release, scoped npm package](https://img.shields.io/librariesio/release/npm/@amm834/luhn?style=plastic)\n\nLuhn is a validation library the can validate Credit Card numbers which are valid or not. 👀\n\n## Installations\n\n```bash\npnpm add @amm834/luhn\n```\n\n# Usage\n\nYou can use `validate` function to validate the credit card number.\n\n```js\nimport {validate} from \"@amm834/luhn\";\n\n\nconst pan = \"4895048712071025\";\n\nconsole.log(validate(pan)) //→ true\n```\n\n## CLI\n\n`@amm834/luhn` support to use as CLI tool. You can use it as follows:\n\n```bash\nluhn validate 4895048712071025 #→ true\n```\n\n## API\n\n```typescript \n/**\n *  @param {string} pan - The credit card number to validate.\n * @returns boolean - A boolean value indicating whether the credit card number is valid.\n */\ndeclare const validate: (pan: string) =\u003e boolean;\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheaungmyatmoe%2Fluhn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheaungmyatmoe%2Fluhn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheaungmyatmoe%2Fluhn/lists"}