Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
/ mpsl Public archive

A relatively small and fast port of the Public Suffix List

License

Notifications You must be signed in to change notification settings

iorate/mpsl

Repository files navigation

mpsl

A relatively small and fast port of the Public Suffix List to JavaScript/TypeScript.

Usage

mpsl.get(domain) returns the registrable part of domain.

import * as mpsl from 'mpsl';

console.log(mpsl.get('www.test.ac.jp')); // test.ac.jp

mpsl.get does not throw an exception and returns null on invalid input.

Author

iorate

License

MIT

Acknowledgements

The Public Suffix List

The Public Suffix List was initiated by Mozilla and is maintained by the community. I appreciate their great work.

The Public Suffix List is available at the official website or the GitHub repository. It is distributed under MPL-2.0.

punycode.js

mpsl depends on punycode.js by Mathias Bynens and mpsl's UMD variant is bundled with it. I appreciate his great work.

The source code of punycode.js is available at the GitHub repository. It is distributed under MIT.