{"id":17137187,"url":"https://github.com/squeek502/lua-public_suffix_list","last_synced_at":"2025-07-28T22:33:45.987Z","repository":{"id":77411199,"uuid":"141240442","full_name":"squeek502/lua-public_suffix_list","owner":"squeek502","description":"Lua interface to the Public Suffix List rules","archived":false,"fork":false,"pushed_at":"2018-10-15T02:15:46.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T12:32:41.586Z","etag":null,"topics":["lua","public-suffix-list"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/squeek502.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-17T06:15:06.000Z","updated_at":"2018-10-15T02:10:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"d33196ac-5209-4493-8f31-c2a10212eda3","html_url":"https://github.com/squeek502/lua-public_suffix_list","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squeek502%2Flua-public_suffix_list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squeek502%2Flua-public_suffix_list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squeek502%2Flua-public_suffix_list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squeek502%2Flua-public_suffix_list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squeek502","download_url":"https://codeload.github.com/squeek502/lua-public_suffix_list/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245224581,"owners_count":20580367,"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":["lua","public-suffix-list"],"created_at":"2024-10-14T20:06:26.727Z","updated_at":"2025-03-24T07:15:19.103Z","avatar_url":"https://github.com/squeek502.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"public_suffix_list\n==================\n\n[![Build Status](https://travis-ci.org/squeek502/lua-public_suffix_list.svg?branch=master)](https://travis-ci.org/squeek502/lua-public_suffix_list)\n\nSimple Lua interface to the [Public Suffix List](https://publicsuffix.org/) rules, intended to be used a building block for implementing the PSL domain parsing algorithm. New Luarocks builds are automatically created each month using the latest Public Suffix List.\n\n```lua\nlocal public_suffix_list = require('public_suffix_list')\n\nif public_suffix_list.exists('com') then\n  -- ...\nend\n```\n\n## Installation\nWith [Luarocks](https://luarocks.org):\n```\nluarocks install public_suffix_list\n```\n\n## Generating\nNote: `public_suffix_list.lua` is not checked into the repository. Instead, [`public_suffix_list.dat`](https://publicsuffix.org/list/public_suffix_list.dat) is parsed and converted into a Lua table that is then used to create `public_suffix_list.lua` (from `public_suffix_list.in.lua`).\n\n- Clone this repository\n- Download `public_suffix_list.dat` from [here](https://publicsuffix.org/list/public_suffix_list.dat) or [here](https://raw.githubusercontent.com/publicsuffix/list/HEAD/public_suffix_list.dat)\n- Run `lua generate.lua`\n\n## API Reference\n\n### `public_suffix_list.exists(suffix)`\nChecks if the suffix rule exists (can be any type). On success, returns `true`; otherwise, returns `false`.\n\n### `public_suffix_list.getType(suffix)`\nReturns the type of the suffix rule (as a lowercase string) if it exists (e.g. `\"icann\"` or `\"private\"`); othwerwise, returns `nil, errmsg`.\n\n### `public_suffix_list.isICANN(suffix)`\nReturns `true` if the suffix rule is delegated by ICANN; otherwise, returns `false`.\n\n### `public_suffix_list.isPrivate(suffix)`\nReturns `true` if the suffix rule is submitted by a domain holder; otherwise, returns `false`.\n\n### `public_suffix_list.rules`\nA table of `key, value` pairs where `key` is a suffix rule type (as a lowercase string, e.g. `\"icann\"`) and `value` is an array-like table of suffix rules.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqueek502%2Flua-public_suffix_list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsqueek502%2Flua-public_suffix_list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqueek502%2Flua-public_suffix_list/lists"}