Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section and rule fields to parse function #339

Open
wdhdev opened this issue Dec 5, 2024 · 0 comments
Open

Add section and rule fields to parse function #339

wdhdev opened this issue Dec 5, 2024 · 0 comments
Assignees

Comments

@wdhdev
Copy link

wdhdev commented Dec 5, 2024

You should implement a section field in the parse function which will return the section of the PSL the rule is listed in.

So, if the rule is co.uk for example, return this:

"section": "ICANN"

Or if the rule is in the private section (e.g. github.io), return:

"section": "PRIVATE"

And if the listed returns false (as in it is an invalid TLD), just return null.

Another field it would be good to implement is a rule field, which will return the public suffix rule. For example, if the input is example.com.au, the corresponding rule in the PSL would be com.au, or if example.com.au is listed in the PSL itself, then the rule would be example.com.au, basically whatever is actually listed on the PSL. This would be a helpful thing to return and I'm sure quite a few people could use it.

@lupomontero lupomontero self-assigned this Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants