Skip to content

[Feature Request] Ability to augment private suffix section #2172

@samczsun

Description

@samczsun

First of all, thank you for this library, it's been a breath of fresh air over psl.

That being said, the PSL is (and likely will always be) incomplete and as a third party, it's not possible to add entries due to their policy of only allowing domain owners to submit changes. This means that if anyone is consuming PSL as a heuristic for hostnames containing user-generated content, they will inevitably run into the need to augment the list with additional entries.

I see that this was discussed previously in #1486, but it's been almost 2 years and I wanted to see if you'd be willing to revisit the topic. While it's possible to hack around the library to support this feature, official support would be greatly appreciated for those who are willing to take the performance hit.

The biggest thing that would help is simply publishing the tldts-utils package with exports so people can make use of the PSL parser as well as the trie builder at runtime.

However, some additional minor tweaks would make the developer experience even better:

  • Exporting the suffixLookup function from tldts so that it has proper types (unless I'm doing it wrong). import suffixLookup from 'tldts/dist/types/src/suffix-trie' doesn't seem to work while import suffixLookup from 'tldts/dist/es6/src/suffix-trie' doesn't come with typings
  • Exporting the FLAG enum so that it can be used with parseImpl, instead of hardcoding the constant

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions