You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
You should implement a
section
field in theparse
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:Or if the rule is in the private section (e.g.
github.io
), return:And if the
listed
returnsfalse
(as in it is an invalid TLD), just returnnull
.Another field it would be good to implement is a
rule
field, which will return the public suffix rule. For example, if the input isexample.com.au
, the corresponding rule in the PSL would becom.au
, or ifexample.com.au
is listed in the PSL itself, then the rule would beexample.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.The text was updated successfully, but these errors were encountered: