{"id":16769037,"url":"https://github.com/tieske/mod11","last_synced_at":"2025-08-17T18:45:26.139Z","repository":{"id":141902113,"uuid":"15683470","full_name":"Tieske/mod11","owner":"Tieske","description":"Lua modulo11 number generator and verificator","archived":false,"fork":false,"pushed_at":"2014-01-08T13:27:36.000Z","size":176,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T13:43:45.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://tieske.github.io/mod11/","language":"Lua","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/Tieske.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-06T19:54:55.000Z","updated_at":"2023-12-07T13:41:19.000Z","dependencies_parsed_at":"2023-03-13T10:27:45.734Z","dependency_job_id":null,"html_url":"https://github.com/Tieske/mod11","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Tieske/mod11","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tieske%2Fmod11","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tieske%2Fmod11/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tieske%2Fmod11/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tieske%2Fmod11/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tieske","download_url":"https://codeload.github.com/Tieske/mod11/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tieske%2Fmod11/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270892210,"owners_count":24663543,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"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":[],"created_at":"2024-10-13T06:13:10.787Z","updated_at":"2025-08-17T18:45:26.093Z","avatar_url":"https://github.com/Tieske.png","language":"Lua","readme":"mod11\n=====\n\n[![travis-ci status](https://secure.travis-ci.org/Tieske/mod11.png)](http://travis-ci.org/#!/Tieske/mod11/builds)\n\nLua modulo11 number generator and verificator\nModulo 11 is a way to calculate checksums for digitbased codes. Common usage for modulo 11 is ISBN, credit card or bank account numbers. The verification offered is not intended for security, but to catch human errors (typo's). See [this wikipedia article](http://en.wikipedia.org/wiki/Check_digit).\n\n[API documentation](http://tieske.github.io/mod11/) is available online at github as is the [source code](https://github.com/Tieske/mod11)\n\nGeneral usage\n=============\nModulo 11 calculates a checksum based on a weight given to digits based upon their position. The verifycode must be supplied once, and checking numbers can be done against the same verifycode.\nThis implementation uses a verifycode 8 characters long, digits 2-9 (no duplicates). This means that for every 8 input digits 1 checksum digit is added. Different series of numbers can be used with different verifycodes.\n\nFor readability 'allowed' characters can be provided. When calculating or verifying checksums those characters are ignored. Common 'allowed' characters are \"-/.\".\nWith this set of allowed characters the following sequences will get the same checksums;\n\n - 2012.345.67/32\n - 2012-345/67.32\n - 20123456732\n\nExamples\n========\nUsing an invoicenumber containing a date and a sequential number that can be represented like this: \"2013-12-15/015\". The allowed characters must be \"-/\" in this case.\n```lua\nlocal invoice = \"2013-12-15/015\"\nprint(m:calc(invoice..\"-\"))\n````\nThe above example will print the invoice number `2013-12-15/015-xx` where xx is the checksum depending on the verifynumber initially choosen for this sequence.\n\nSearching\n=========\nThe module contains an iterator function that can scan text for valid numbers. Sample use includes checking incoming emails for valid supportcase numbers, or scanning bank transaction details for valid invoice numbers or customerids.\nFor an example see the [sample.lua](https://github.com/Tieske/mod11/blob/master/samples/sample.lua) file. The sample contains 2 series with their own verifynumber sequence, where each iterator will only find its own numbers.\n\nTests\n=====\nTestsuite is included in the `spec` folder and can be executed using [busted](http://olivinelabs.com/busted).\n\nLicense\n=======\n[MIT](https://github.com/Tieske/mod11/blob/master/LICENSE)\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftieske%2Fmod11","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftieske%2Fmod11","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftieske%2Fmod11/lists"}