{"id":20743071,"url":"https://github.com/aimingoo/valider","last_synced_at":"2026-07-06T13:31:24.652Z","repository":{"id":36328533,"uuid":"40633220","full_name":"aimingoo/Valider","owner":"aimingoo","description":"Valider is a Lua module to check rate of any invalid.","archived":false,"fork":false,"pushed_at":"2015-10-29T03:53:17.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T02:58:47.899Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aimingoo.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":"2015-08-13T01:44:35.000Z","updated_at":"2015-08-13T14:58:15.000Z","dependencies_parsed_at":"2022-09-10T09:40:53.373Z","dependency_job_id":null,"html_url":"https://github.com/aimingoo/Valider","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aimingoo/Valider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimingoo%2FValider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimingoo%2FValider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimingoo%2FValider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimingoo%2FValider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aimingoo","download_url":"https://codeload.github.com/aimingoo/Valider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimingoo%2FValider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35193679,"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-06T02:00:07.184Z","response_time":106,"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-11-17T07:08:58.787Z","updated_at":"2026-07-06T13:31:24.634Z","avatar_url":"https://github.com/aimingoo.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Valider\nThe Valider module to check rate of invalid action/event/behaviour, and return a final status to you.\n\nValider include features:\n- continuous invalid X times, or\n- invalid X times in Y seconds\n\nwill report as once. and\n- support multi-tags in a checker\n- very clean \u0026 small, little memory, and faster!\n\n# Install \u0026 Usage\ndownload the Valider.lua file and put into lua search path or current directory.\n\nload it as a file module from lua. use Valider:new() to get checker object.\n```lua\nlocal Valider = require('Valider')\nlocal checker = Valider:new()\n\nif checker:invalid('tag') then\n\t-- do something when status is invalid\n\t..\nend\n```\n\n# Options\n\nyou can create checker with options.\n```lua\nlocal options = {\n\t-- count one continuous-invalid, when less maxContinuousInterval between two invalids\n\tmaxContinuousInterval = 3,\n\n\t-- report as once when continuous-invalid count \u003e= maxContinuous\n\t--\t*) continuous invalid X times\n\tmaxContinuous = 100,\n\n\t-- report as once when invalid count \u003e= maxTimes, in maxSeconds\n\t--\t*) invalid X times in Y seconds history\n\tmaxTimes = 30,\n\tmaxSeconds = 30,\n}\n\n-- get checker with options\n--\t*) or \u003cnil\u003e for default\nlocal checker = Valider:new(options)\n\n..\n```\n\n# Multi-tags checker\nwith tags, you can check multi source action/event/behaviour. the tag is anything(string/boolean/table in lua). for examples:\n```lua\nlocal checker = Valider:new()\n\nif checker:invalid('network hardware invalid') then\n\t..\nend\n\nif checker:invalid('server connection lost') then\n\t..\nend\n\nif (checker:invalid(a_table_variant) or\n\tchecker:invalid(a_boolean_variant) or\n\tchecker:invalid(any_data_as_key_of_lua_table)) then\n\t..\nend\n```\n\n# testcase or samples\nsome examples in testcase/t_base_demo.lua. run it:\n```bash\n\u003e git clone https://github.com/aimingoo/Valider\n\u003e cd Valider/testcase\n\u003e lua t_base_demo.lua\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimingoo%2Fvalider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faimingoo%2Fvalider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimingoo%2Fvalider/lists"}