{"id":21179650,"url":"https://github.com/grantm/algorithm-couponcode","last_synced_at":"2025-07-09T23:31:42.970Z","repository":{"id":1512840,"uuid":"1770500","full_name":"grantm/Algorithm-CouponCode","owner":"grantm","description":"Perl library to generate and validate 'CouponCode' strings","archived":false,"fork":false,"pushed_at":"2024-02-28T16:44:56.000Z","size":69,"stargazers_count":34,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-05T08:11:35.480Z","etag":null,"topics":["coupon-code-generator","javascript","jquery-plugin","perl","widget"],"latest_commit_sha":null,"homepage":"http://search.cpan.org/dist/Algorithm-CouponCode/","language":"Perl","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/grantm.png","metadata":{"files":{"readme":"README.markdown","changelog":"Changes","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":"2011-05-19T09:14:37.000Z","updated_at":"2024-08-21T01:08:25.000Z","dependencies_parsed_at":"2024-06-21T17:39:39.501Z","dependency_job_id":"712b1105-065a-4bf3-a62f-e88c5a47b547","html_url":"https://github.com/grantm/Algorithm-CouponCode","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/grantm/Algorithm-CouponCode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantm%2FAlgorithm-CouponCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantm%2FAlgorithm-CouponCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantm%2FAlgorithm-CouponCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantm%2FAlgorithm-CouponCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grantm","download_url":"https://codeload.github.com/grantm/Algorithm-CouponCode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantm%2FAlgorithm-CouponCode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264505236,"owners_count":23618909,"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":["coupon-code-generator","javascript","jquery-plugin","perl","widget"],"created_at":"2024-11-20T17:32:53.838Z","updated_at":"2025-07-09T23:31:42.654Z","avatar_url":"https://github.com/grantm.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"CouponCode\n==========\n\nA 'CouponCode' is a type of code that will be passed *in printed form* to\nsomeone who will be expected to type it into a web page or other application.\nThe codes are random strings which are designed to be easy for the recipient to\ntype accurately into a web form.\n\nThe following features make the codes well suited to manual transcription:\n\n* The codes are not case sensitive.\n* Not all letters and numbers are used, so if a person enters the letter 'O' we\n  can automatically correct it to the digit '0' (similarly for I =\u003e 1, S =\u003e 5,\n  Z =\u003e 2).\n* The 4th character of each part is a checkdigit, so client-side scripting can\n  be used to highlight parts which have been mis-typed, before the code is even\n  submitted to the application's back-end validation.\n* The checkdigit algorithm takes into account the position of the part being\n  keyed. So for example '1K7Q' might be valid in the first part but not in the\n  second so if a user typed the parts in the wrong boxes then their error could\n  be highlighted.\n* The code generation algorithm avoids 'undesirable' codes. For example any\n  code in which transposed characters happen to result in a valid checkdigit\n  will be skipped. Any generated part which happens to spell an 'inappropriate'\n  4-letter word (e.g.: 'P00P') will also be skipped.\n\nAlgorithm::CouponCode\n---------------------\n\nThis git repository contains:\n\n* the Perl [CPAN module](http://search.cpan.org/dist/Algorithm-CouponCode/)\nwhich implements the code generation algorithm and the server-side validation\n* a [Javascript implementation](http://search.cpan.org/dist/Algorithm-CouponCode/html/index.html)\nof the validator function, in the form of a jQuery plugin, which can be\nincluded in your web application to do client-side validation and highlighting\nof errors\n\nAlternative implementations\n---------------------------\n\nThe code generation and server-side validation routines have been ported to\nother languages (_Note: a listing here does not constitute an endorsement nor a\nguarantee of compatibility_):\n\n\n* [Javascript for Node.js](https://www.npmjs.com/package/coupon-code)\n* [Ruby](https://rubygems.org/gems/coupon_code/versions/0.0.1)\n* [PHP](https://github.com/atelierdisko/coupon_code)\n* [C#](https://github.com/rebeccapowell/csharp-algorithm-coupon-code)\n* [Go](https://github.com/CaptainCodeman/couponcode)\n* [Elixir](https://hexdocs.pm/coupon_code_ex/CouponCode.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantm%2Falgorithm-couponcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrantm%2Falgorithm-couponcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantm%2Falgorithm-couponcode/lists"}