{"id":19136670,"url":"https://github.com/theodrosyimer/luhn","last_synced_at":"2025-07-26T13:07:20.374Z","repository":{"id":230208431,"uuid":"778695062","full_name":"theodrosyimer/luhn","owner":"theodrosyimer","description":"Implementation of the Luhn's algorithm using TypeScript","archived":false,"fork":false,"pushed_at":"2024-03-29T02:10:21.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T17:54:05.505Z","etag":null,"topics":["algorithm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theodrosyimer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2024-03-28T08:09:46.000Z","updated_at":"2024-03-29T00:05:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7723483-03be-4e82-8cba-de418b5e283a","html_url":"https://github.com/theodrosyimer/luhn","commit_stats":null,"previous_names":["theodrosyimer/luhn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodrosyimer%2Fluhn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodrosyimer%2Fluhn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodrosyimer%2Fluhn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodrosyimer%2Fluhn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theodrosyimer","download_url":"https://codeload.github.com/theodrosyimer/luhn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240215312,"owners_count":19766395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["algorithm","typescript"],"created_at":"2024-11-09T06:35:10.925Z","updated_at":"2025-02-22T18:19:51.144Z","avatar_url":"https://github.com/theodrosyimer.png","language":"TypeScript","readme":"# Luhn's algorithm\n\n## Motivation\n\nMake an implementation of the Luhn's algorithm using TypeScript.\n\n## Quick start\n\n### Install\n\n```sh\ngit clone https://github.com/theodrosyimer/luhn\n```\n\n## Usage\n\nRun:\n```sh\ntsx luhn.ts -h\n````\n\n```sh\nUsage: tsx luhn.ts [options]\n\nValidate a number based on Luhn algorithm and/or complete the given number to be valid according to the Luhn algorithm.\nMore than one occurrence of an option can be passed to the command.\n\nExample:\n  tsx luhn.ts -c 5140256942783546 -c 5140256942783646 -f 192924593889831\n\nOptions:\n  -c \u003cnumber\u003e\tvalidate the given number\n  -f \u003cnumber\u003e\tcomplete the given number\n  -g [options] \tgenerate valid IMEI number and credit cards number (Visa, American Express and Mastercard)\n  -h         \tdisplay help for the command\n```\n\nUsing `-g` flag:\n\n```sh\nUsage: tsx luhn.ts -g [options]\n\nGenerate random IMEI number or credit card number by type.\n\nExamples:\n  tsx luhn.ts -g imei\n\n  tsx luhn.ts -g card visa\n\n  tsx luhn.ts -g card master\n\n  tsx luhn.ts -g card amex\n\nCommands:\n  imei [length]\tgenerate a valid IMEI number, length is OPTIONAL and if given MUST be 15, 16 or 17\n  card \u003ctype\u003e\tgenerate a valid credit card number by type\n```\n\n## Contributors\n\n- [Alizée](https://github.com/alifrappe)\n- [BornLimitles5](https://github.com/BornLimitles5)\n- [theodrosyimer](https://github.com/theodrosyimer)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodrosyimer%2Fluhn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheodrosyimer%2Fluhn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodrosyimer%2Fluhn/lists"}