mpsl
TypeScript icon, indicating that this package has built-in type declarations

3.1.22 • Public • Published

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.

Package Sidebar

Install

npm i mpsl

Weekly Downloads

27

Version

3.1.22

License

MIT

Unpacked Size

511 kB

Total Files

10

Last publish

Collaborators

  • iorate