Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

tldts

remusao17.3mMIT6.1.74TypeScript support: included

Library to work against complex domain names, subdomains and URIs.

tld, sld, domain, subdomain, subdomain, hostname, browser, uri, url, domain name, public suffix, url parsing, typescript

readme

tldts - Blazing Fast URL Parsing

tldts is a JavaScript library to extract hostnames, domains, public suffixes, top-level domains and subdomains from URLs.

Features:

  1. Tuned for performance (order of 0.1 to 1 μs per input)
  2. Handles both URLs and hostnames
  3. Full Unicode/IDNA support
  4. Support parsing email addresses
  5. Detect IPv4 and IPv6 addresses
  6. Continuously updated version of the public suffix list
  7. TypeScript, ships with umd, esm, cjs bundles and type definitions
  8. Small bundles and small memory footprint
  9. Battle tested: full test coverage and production use

⚠️ If you are migrating to tldts from another library like psl, make sure to check the migration section.

Install

npm install --save tldts

Usage

Using the command-line interface:

$ npx tldts 'http://www.writethedocs.org/conf/eu/2017/'
{
  "domain": "writethedocs.org",
  "domainWithoutSuffix": "writethedocs",
  "hostname": "www.writethedocs.org",
  "isIcann": true,
  "isIp": false,
  "isPrivate": false,
  "publicSuffix": "org",
  "subdomain": "www"
}

Or from the command-line in batch:

$ echo "http://www.writethedocs.org/\nhttps://example.com" | npx tldts
{
  "domain": "writethedocs.org",
  "domainWithoutSuffix": "writethedocs",
  "hostname": "www.writethedocs.org",
  "isIcann": true,
  "isIp": false,
  "isPrivate": false,
  "publicSuffix": "org",
  "subdomain": "www"
}
{
  "domain": "example.com",
  "domainWithoutSuffix": "example",
  "hostname": "example.com",
  "isIcann": true,
  "isIp": false,
  "isPrivate": false,
  "publicSuffix": "com",
  "subdomain": ""
}

Programmatically:

const { parse } = require('tldts');

// Retrieving hostname related informations of a given URL
parse('http://www.writethedocs.org/conf/eu/2017/');
// { domain: 'writethedocs.org',
//   domainWithoutSuffix: 'writethedocs',
//   hostname: 'www.writethedocs.org',
//   isIcann: true,
//   isIp: false,
//   isPrivate: false,
//   publicSuffix: 'org',
//   subdomain: 'www' }

Modern ES6 modules import is also supported:

import { parse } from 'tldts';

Alternatively, you can try it directly in your browser here: https://npm.runkit.com/tldts

Check README.md for more details about the API.

Migrating from other libraries

TL;DR—here is a quick overview of how to use tldts to match the default behavior of the psl library. Skip to after the tables for a more detailed explanation.

| | Parsing a hostname | | --- | --- | | tldts | tldts.parse('spark-public.s3.amazonaws.com', { allowPrivateDomains: true }) | | psl | psl.parse('spark-public.s3.amazonaws.com') | | Note | Make sure to include { allowPrivateDomains: true } to consider private suffixes |

| | Parsing a URL | | --- | --- | | tldts | tldts.parse('https://spark-public.s3.amazonaws.com/data', { allowPrivateDomains: true }) | | psl | psl.parse(new URL('https://spark-public.s3.amazonaws.com/data').hostname) | | Note | No need to extract hostnames from URLs, tldts can do that for you |

| | Getting the domain | | --- | --- | | tldts | tldts.getDomain('spark-public.s3.amazonaws.com', { allowPrivateDomains: true }) | | psl | psl.get('spark-public.s3.amazonaws.com') | | Note | Using specific functions like getDomain are more efficient then relying on parse |

| | Getting the Public Suffix | | --- | --- | | tldts | tldts.getPublicSuffix('spark-public.s3.amazonaws.com', { allowPrivateDomains: true }) | | psl | psl.parse('spark-public.s3.amazonaws.com').tld |

Explanation. There are multiple libraries which can be used to parse URIs based on the Public Suffix List. Not all these libraries offer the same behavior by default and depending on your particular use-case, this can matter. When migrating from another library to tldts, make sure to read this section to preserve the same behavior.

The biggest difference between tldts's default behavior and some other libraries like psl has to do with which suffixes are considered by default. The default for tldts is to only consider the ICANN section and ignore the Private section.

Consider this example using the unmaintained psl library:

const psl = require('psl');

psl.parse('https://spark-public.s3.amazonaws.com/dataanalysis/loansData.csv')
// {
//   input: 'spark-public.s3.amazonaws.com',
//   tld: 's3.amazonaws.com', <<< Public Suffix is from Private section
//   sld: 'spark-public',
//   domain: 'spark-public.s3.amazonaws.com',
//   subdomain: null,
//   listed: true
// }

And now with tldts:

const { parse } = require('tldts');

parse('spark-public.s3.amazonaws.com');
// {
//   domain: 'amazonaws.com',
//   domainWithoutSuffix: 'amazonaws',
//   hostname: 'spark-public.s3.amazonaws.com',
//   isIcann: true,
//   isIp: false,
//   isPrivate: false,
//   publicSuffix: 'com', <<< By default, use Public Suffix from ICANN section
//   subdomain: 'spark-public.s3'
// }

To get the same behavior, you need to pass the { allowPrivateDomains: true } option:

const { parse } = require('tldts');

parse('spark-public.s3.amazonaws.com', { allowPrivateDomains: true });
// {
//   domain: 'spark-public.s3.amazonaws.com',
//   domainWithoutSuffix: 'spark-public',
//   hostname: 'spark-public.s3.amazonaws.com',
//   isIcann: false,
//   isIp: false,
//   isPrivate: true,
//   publicSuffix: 's3.amazonaws.com', <<< Private Public Suffix is used
//   subdomain: ''
// }

Here are some other differences which can make your life easy. tldts accepts both hostnames and URLs as arguments, so you do not need to parse your inputs before handing them over to tldts:

const { parse } = require('tldts');

// Both are fine!
parse('spark-public.s3.amazonaws.com', { allowPrivateDomains: true });
parse('https://spark-public.s3.amazonaws.com/dataanalysis/loansData.csv', { allowPrivateDomains: true });

tldts offers dedicated methods to extract the Public Suffix, domain, subdomain, etc. without having to rely on the more generic parse function. This is also more efficient than calling parse, because less work as to be done.

const {
  getHostname,
  getDomain,
  getPublicSuffix,
  getSubdomain,
  getDomainWithoutSuffix,
} = require('tldts');

const url = 'https://spark-public.s3.amazonaws.com';

console.log(getHostname(url)); // spark-public.s3.amazonaws.com
console.log(getDomain(url, { allowPrivateDomains: true })); // spark-public.s3.amazonaws.com
console.log(getPublicSuffix(url, { allowPrivateDomains: true })); // s3.amazonaws.com
console.log(getSubdomain(url, { allowPrivateDomains: true })); // ''
console.log(getDomainWithoutSuffix(url, { allowPrivateDomains: true })); // spark-public

Contributors

tldts is based upon the excellent tld.js library and would not exist without the many contributors who worked on the project.

This project would not be possible without the amazing Mozilla's public suffix list either. Thank you for your hard work!

License

MIT License.

changelog

v6.1.74 (Wed Jan 22 2025)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.73 (Sat Jan 18 2025)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.72 (Wed Jan 15 2025)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts-tests, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.71 (Mon Jan 06 2025)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.70 (Wed Dec 25 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.69 (Thu Dec 19 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

  • Bump @rollup/plugin-typescript from 12.1.1 to 12.1.2 #2236 (@dependabot[bot])
  • tldts-core, tldts-experimental, tldts-icann, tldts-utils, tldts

Authors: 2


v6.1.68 (Sat Dec 14 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts-tests, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.67 (Wed Dec 11 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

Authors: 1


v6.1.66 (Sat Dec 07 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.65 (Sat Nov 30 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.64 (Sat Nov 23 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

Authors: 1


v6.1.63 (Thu Nov 21 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.62 (Wed Nov 20 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.61 (Wed Nov 13 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.60 (Sun Nov 10 2024)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v6.1.59 (Thu Nov 07 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.58 (Sat Nov 02 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

Authors: 1


v6.1.57 (Tue Oct 29 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.56 (Sat Oct 26 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.55 (Thu Oct 24 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

Authors: 1


v6.1.54 (Tue Oct 22 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.1.53 (Tue Oct 22 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.52 (Wed Oct 16 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

Authors: 1


v6.1.51 (Sat Oct 12 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:memo: Documentation

:nut_and_bolt: Dependencies

Authors: 2


v6.1.50 (Thu Oct 03 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.49 (Wed Oct 02 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.48 (Fri Sep 27 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts
  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.47 (Thu Sep 19 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.46 (Sun Sep 15 2024)

:scroll: Update Public Suffix List

  • tldts-icann, tldts

Authors: 1


v6.1.45 (Fri Sep 13 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.44 (Tue Sep 10 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

Authors: 1


v6.1.43 (Sat Sep 07 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

Authors: 1


v6.1.42 (Thu Sep 05 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.41 (Thu Aug 22 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.40 (Mon Aug 19 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.39 (Sat Aug 10 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

Authors: 1


v6.1.38 (Mon Aug 05 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.37 (Wed Jul 31 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.36 (Mon Jul 29 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.35 (Fri Jul 26 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.34 (Tue Jul 23 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

Authors: 1


v6.1.33 (Sat Jul 20 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.32 (Wed Jul 17 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

Authors: 1


v6.1.31 (Sun Jul 07 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.30 (Thu Jun 27 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.1.29 (Sat Jun 22 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.28 (Thu Jun 20 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.27 (Mon Jun 17 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

Authors: 1


v6.1.26 (Fri Jun 14 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.25 (Thu Jun 06 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.24 (Sat Jun 01 2024)

:scroll: Update Public Suffix List

Authors: 1


v6.1.23 (Tue May 28 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.1.22 (Sun May 26 2024)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v6.1.21 (Tue May 21 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

Authors: 1


v6.1.20 (Mon May 13 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.19 (Sat May 04 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.18 (Fri Apr 19 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.1.17 (Fri Apr 19 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.16 (Fri Mar 29 2024)

:scroll: Update Public Suffix List

  • tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.15 (Wed Mar 27 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.14 (Thu Mar 21 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.13 (Thu Mar 07 2024)

:bug: Bug Fix

  • tldts-core, tldts-experimental, tldts-icann, tldts

:nail_care: Polish

Authors: 1


v6.1.12 (Thu Mar 07 2024)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v6.1.11 (Tue Feb 13 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.1.10 (Thu Feb 08 2024)

:scroll: Update Public Suffix List

  • tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.9 (Tue Feb 06 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.1.8 (Sun Feb 04 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.1.7 (Sat Feb 03 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.6 (Fri Feb 02 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.5 (Fri Feb 02 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.1.4 (Sat Jan 27 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.3 (Wed Jan 24 2024)

:scroll: Update Public Suffix List

  • tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.2 (Sun Jan 07 2024)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.1 (Thu Dec 14 2023)

:scroll: Update Public Suffix List

  • tldts-icann, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.1.0 (Tue Dec 05 2023)

:rocket: New Feature

  • tldts-experimental, tldts-icann, tldts
    • Add new tldts-icann package which does not contain private rules #1888 (@remusao)

Authors: 1


v6.0.23 (Mon Dec 04 2023)

:nail_care: Polish

  • chore: replace native punycode by package to avoid deprecation #1887 (@remusao)

:nut_and_bolt: Dependencies

Authors: 2


v6.0.22 (Mon Nov 27 2023)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v6.0.21 (Tue Nov 21 2023)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v6.0.20 (Thu Nov 16 2023)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v6.0.19 (Sun Nov 05 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.0.18 (Thu Nov 02 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.0.17 (Sun Oct 22 2023)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v6.0.16 (Fri Oct 06 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.0.15 (Sat Sep 23 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.0.14 (Thu Aug 10 2023)

:scroll: Update Public Suffix List

Authors: 1


v6.0.13 (Sun Jul 30 2023)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v6.0.12 (Sat Jul 22 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

⚠️ Pushed to master

:house: Internal

:nut_and_bolt: Dependencies

Authors: 2


v6.0.11 (Mon Jul 10 2023)

:bug: Bug Fix

Authors: 1


v6.0.10 (Mon Jul 10 2023)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v6.0.9 (Sat Jul 01 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.0.8 (Sun Jun 18 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.0.7 (Sat Jun 17 2023)

:scroll: Update Public Suffix List

Authors: 1


v6.0.6 (Fri Jun 16 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.0.5 (Tue May 09 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.0.4 (Tue May 02 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:house: Internal

:nut_and_bolt: Dependencies

Authors: 2


v6.0.3 (Sat Apr 08 2023)

:scroll: Update Public Suffix List

  • tldts-core, tldts-experimental, tldts-utils, tldts

:nut_and_bolt: Dependencies

Authors: 2


v6.0.2 (Mon Apr 03 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v6.0.1 (Sat Apr 01 2023)

:bug: Bug Fix

  • tldts-experimental
    • Extended tests and fix in wildcard matching from tldts-experimental #1593 (@remusao)

Authors: 1


v6.0.0 (Sat Apr 01 2023)

Release Notes

Be more lenient in accepting leading underscores and dots in hostnames (#1553)

Handling of leading dot(s) in input URIs and hostnames:

- expect(isValidHostname('.github.com')).to.equal(false);
+ expect(isValidHostname('.github.com')).to.equal(true);

- expect(getDomain('.github.com')).to.equal(null);
+ expect(getDomain('.github.com')).to.equal('github.com');

- expect(getDomain('.remusao.github.io')).to.equal(null);
+ expect(getDomain('.remusao.github.io')).to.equal('github.io');

Handling of leading underscores in input URIs and hostnames:

- expect(getDomain('_0f6879.bsg-1418.bryanjswift.com')).to.equal(null);
+ expect(getDomain('_0f6879.bsg-1418.bryanjswift.com')).to.equal('bryanjswift.com');

Lastly, increase test coverage using test cases found in the whatwg spec.

This is a breaking change because some might rely on the previous behavior to consider leading dots and underscores as invalid hostnames or domains.

Resolves #1534 Resolves #1523

tooling: migrate to eslint + TypeScript v5 + prettier (#1575)

Updated internal representation of the DAWG used to encode the public suffix list, resulting in ~5% size reduction of minified bundle for identical performance (and likely a faster parsing/loading time of the source, although I did not measure that particular aspect yet).

Migrate from deprecated tslint to eslint with TypeScript support and fix most of the issues encountered, resulting in tighter typing. Bump TypeScript to v5 as well and make sure code-base is formatted according to prettier's preset.


:boom: Breaking Change

  • tldts-core, tldts-experimental, tldts
    • Be more lenient in accepting leading underscores and dots in hostnames #1553 (@remusao)

:house: Internal

  • tldts-core, tldts-experimental, tldts
    • tooling: migrate to eslint + TypeScript v5 + prettier #1575 (@remusao)

Authors: 1


v5.7.112 (Sun Mar 19 2023)

:scroll: Update Public Suffix List

Authors: 1


v5.7.111 (Wed Mar 08 2023)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.110 (Wed Mar 01 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:house: Internal

  • tldts-core, tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.109 (Wed Feb 15 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.108 (Sat Feb 11 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.107 (Fri Feb 10 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.106 (Wed Feb 08 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.105 (Thu Feb 02 2023)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.104 (Wed Jan 04 2023)

:nail_care: Polish

:nut_and_bolt: Dependencies

Authors: 1


v5.7.103 (Mon Dec 19 2022)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.102 (Thu Dec 01 2022)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.101 (Wed Nov 23 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.100 (Tue Nov 15 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.99 (Mon Nov 07 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.98 (Sat Nov 05 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:house: Internal

  • tldts-core, tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.97 (Fri Oct 14 2022)

:scroll: Update Public Suffix List

Authors: 1


v5.7.96 (Fri Oct 14 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.95 (Tue Oct 11 2022)

:scroll: Update Public Suffix List

Authors: 1


v5.7.94 (Fri Oct 07 2022)

:scroll: Update Public Suffix List

Authors: 1


v5.7.93 (Tue Oct 04 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.92 (Sat Sep 24 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.91 (Sun Sep 04 2022)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.90 (Fri Aug 26 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.89 (Thu Aug 11 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.88 (Sun Aug 07 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.87 (Tue Aug 02 2022)

:nail_care: Polish

  • tldts-core, tldts-experimental, tldts

Authors: 1


v5.7.85 (Sun Jul 31 2022)

:nail_care: Polish

  • tldts-core, tldts-experimental, tldts
    • Include 'src' folder as part of published packages #1396 (@remusao)

:nut_and_bolt: Dependencies

Authors: 2


v5.7.84 (Mon Jul 04 2022)

:scroll: Update Public Suffix List

Authors: 1


v5.7.83 (Wed Jun 29 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:house: Internal

:nut_and_bolt: Dependencies

Authors: 2


v5.7.82 (Tue Jun 14 2022)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.81 (Sat Jun 04 2022)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.80 (Sun May 22 2022)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.79 (Mon May 16 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.78 (Wed May 11 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.77 (Sat Apr 30 2022)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.76 (Sat Apr 16 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.75 (Fri Apr 08 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.74 (Thu Mar 31 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.73 (Sat Mar 26 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.72 (Tue Mar 22 2022)

:scroll: Update Public Suffix List

Authors: 1


v5.7.71 (Mon Mar 21 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.70 (Thu Mar 17 2022)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.69 (Sun Mar 06 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.68 (Sat Mar 05 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.67 (Mon Feb 28 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.66 (Wed Feb 23 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.65 (Sat Feb 19 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.64 (Sat Feb 19 2022)

:scroll: Update Public Suffix List

Authors: 1


v5.7.63 (Tue Feb 15 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.62 (Sun Feb 13 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.61 (Fri Feb 04 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.60 (Sat Jan 29 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.59 (Fri Jan 21 2022)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.58 (Mon Jan 03 2022)

:scroll: Update Public Suffix List

Authors: 1


v5.7.57 (Thu Dec 16 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.56 (Tue Dec 07 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.55 (Sun Dec 05 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.54 (Sun Dec 05 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.53 (Thu Nov 18 2021)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.52 (Wed Nov 10 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.51 (Mon Nov 08 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.50 (Fri Oct 29 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.49 (Mon Oct 18 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.48 (Thu Oct 14 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.47 (Tue Sep 28 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.46 (Sun Sep 26 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.45 (Tue Sep 21 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.44 (Fri Sep 17 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.43 (Sun Sep 05 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.42 (Fri Sep 03 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.41 (Fri Aug 27 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.40 (Fri Aug 06 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.39 (Thu Aug 05 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:house: Internal

:nut_and_bolt: Dependencies

Authors: 2


v5.7.38 (Sun May 30 2021)

:scroll: Update Public Suffix List

  • tldts-core, tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.37 (Wed May 19 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.36 (Tue May 18 2021)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.35 (Tue May 11 2021)

:scroll: Update Public Suffix List

:house: Internal

  • tldts-core, tldts-experimental, tldts

Authors: 1


v5.7.34 (Thu May 06 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.33 (Sat May 01 2021)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.32 (Wed Apr 28 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.31 (Tue Apr 27 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.30 (Tue Apr 27 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.29 (Fri Apr 23 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.28 (Thu Apr 22 2021)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.27 (Mon Apr 19 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.26 (Sun Apr 18 2021)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.25 (Wed Apr 07 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.24 (Mon Apr 05 2021)

:scroll: Update Public Suffix List

Authors: 1


v5.7.23 (Sat Apr 03 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.22 (Fri Apr 02 2021)

:nail_care: Polish

Authors: 2


v5.7.21 (Thu Apr 01 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.7.20 (Tue Mar 30 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.19 (Sun Mar 28 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.18 (Fri Mar 26 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.17 (Mon Mar 22 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.16 (Thu Mar 18 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.15 (Sun Mar 14 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.14 (Sat Mar 13 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.13 (Wed Mar 10 2021)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.12 (Sat Mar 06 2021)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.11 (Wed Mar 03 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.10 (Wed Feb 24 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.9 (Sun Feb 21 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.8 (Thu Feb 18 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.7 (Tue Feb 16 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.6 (Fri Feb 12 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.5 (Thu Feb 11 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.4 (Wed Feb 10 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.3 (Tue Feb 09 2021)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.7.2 (Fri Jan 29 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.1 (Mon Jan 25 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.7.0 (Fri Jan 22 2021)

:rocket: New Feature

  • tldts-core, tldts-experimental, tldts

Authors: 1


v5.6.85 (Fri Jan 22 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.6.84 (Tue Jan 19 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.6.83 (Thu Jan 14 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.6.82 (Tue Jan 12 2021)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.6.81 (Sat Jan 09 2021)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.6.80 (Fri Dec 25 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.6.79 (Fri Dec 18 2020)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.6.78 (Thu Dec 17 2020)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

Authors: 1


v5.6.77 (Tue Dec 15 2020)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.6.76 (Sat Dec 12 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 2


v5.6.75 (Fri Dec 11 2020)

:scroll: Update Public Suffix List

  • tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 2


v5.6.74 (Wed Dec 02 2020)

:scroll: Update Public Suffix List

:house: Internal

:nut_and_bolt: Dependencies

Authors: 2


v5.6.73 (Sun Nov 22 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.72 (Wed Nov 18 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.71 (Thu Nov 12 2020)

:scroll: Update Public Suffix List

Authors: 2


v5.6.70 (Wed Nov 11 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.69 (Tue Nov 10 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.68 (Sat Nov 07 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.67 (Fri Nov 06 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.66 (Wed Nov 04 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.65 (Tue Nov 03 2020)

:scroll: Update Public Suffix List

:house: Internal

:nut_and_bolt: Dependencies

Authors: 3


v5.6.64 (Fri Oct 30 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.63 (Thu Oct 29 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.62 (Thu Oct 29 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.61 (Tue Oct 27 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.60 (Wed Oct 14 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.59 (Tue Oct 13 2020)

:scroll: Update Public Suffix List

Authors: 2


v5.6.58 (Sat Oct 10 2020)

⚠️ Pushed to master

Authors: 1


v5.6.57 (Fri Oct 09 2020)

:scroll: Update Public Suffix List

Authors: 2


v5.6.56 (Fri Oct 09 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.55 (Thu Sep 17 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.54 (Wed Sep 09 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.53 (Sat Sep 05 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.52 (Fri Aug 28 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.51 (Tue Aug 25 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.50 (Mon Aug 17 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.49 (Fri Aug 14 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.48 (Tue Aug 11 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.47 (Sat Aug 08 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.46 (Tue Aug 04 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.45 (Wed Jul 29 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.44 (Wed Jul 29 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.43 (Tue Jul 21 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.42 (Sat Jul 18 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.41 (Fri Jul 17 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.40 (Thu Jul 16 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.39 (Tue Jul 14 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.38 (Sat Jun 27 2020)

:scroll: Update Public Suffix List

Authors: 2


v5.6.37 (Sat Jun 27 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.36 (Wed Jun 24 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.35 (Sun Jun 21 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.34 (Tue Jun 16 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.33 (Sun Jun 14 2020)

:scroll: Update Public Suffix List

Authors: 2


v5.6.32 (Fri Jun 12 2020)

:scroll: Update Public Suffix List

Authors: 2


v5.6.31 (Thu Jun 11 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.30 (Sat Jun 06 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.29 (Thu May 28 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.28 (Thu May 28 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.27 (Wed May 27 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.26 (Sat May 23 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.25 (Wed May 06 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.24 (Fri Apr 24 2020)

:scroll: Update Public Suffix List

:house: Internal

  • tldts-core, tldts-experimental, tldts

:nut_and_bolt: Dependencies

Authors: 3


v5.6.23 (Thu Apr 09 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.22 (Tue Apr 07 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.21 (Mon Apr 06 2020)

:bug: Bug Fix

:nut_and_bolt: Dependencies

Authors: 2


v5.6.20 (Sat Apr 04 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.19 (Thu Apr 02 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.18 (Wed Apr 01 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.17 (Mon Mar 30 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.16 (Sun Mar 29 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.15 (Thu Mar 26 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.14 (Sun Mar 22 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.13 (Sat Mar 21 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.12 (Sun Mar 15 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.11 (Wed Mar 11 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

Authors: 3


v5.6.10 (Tue Mar 03 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

  • chore(deps-dev): bump typescript from 3.8.2 to 3.8.3

Bumps typescript from 3.8.2 to 3.8.3.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #399 (@dependabot-preview[bot])

  • chore(deps-dev): bump @types/node from 13.7.6 to 13.7.7

Bumps @types/node from 13.7.6 to 13.7.7.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #398 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.15.4 to 9.15.5

Bumps auto from 9.15.4 to 9.15.5.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #406 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.15.3 to 9.15.4

Bumps auto from 9.15.3 to 9.15.4.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #405 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.15.2 to 9.15.3

Bumps auto from 9.15.2 to 9.15.3.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #404 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.15.1 to 9.15.2

Bumps auto from 9.15.1 to 9.15.2.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #403 (@dependabot-preview[bot])

  • tldts-experimental, tldts
    • chore(deps-dev): bump @ampproject/rollup-plugin-closure-compiler

Bumps @ampproject/rollup-plugin-closure-compiler from 0.22.2 to 0.23.0.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #402 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.15.0 to 9.15.1

Bumps auto from 9.15.0 to 9.15.1.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #401 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.14.0 to 9.15.0

Bumps auto from 9.14.0 to 9.15.0.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #400 (@dependabot-preview[bot])

  • chore(deps-dev): bump rollup from 1.31.1 to 1.32.0

Bumps rollup from 1.31.1 to 1.32.0.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #397 (@dependabot-preview[bot])

Authors: 3


v5.6.9 (Fri Feb 28 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

  • chore(deps-dev): bump @types/node from 13.7.5 to 13.7.6

Bumps @types/node from 13.7.5 to 13.7.6.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #396 (@dependabot-preview[bot])

  • chore(deps-dev): bump @types/node from 13.7.4 to 13.7.5

Bumps @types/node from 13.7.4 to 13.7.5.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #394 (@dependabot-preview[bot])

  • chore(deps-dev): bump typescript from 3.7.5 to 3.8.2

Bumps typescript from 3.7.5 to 3.8.2.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #386 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.13.1 to 9.14.0

Bumps auto from 9.13.1 to 9.14.0.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #393 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.13.0 to 9.13.1

Bumps auto from 9.13.0 to 9.13.1.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #392 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.12.1 to 9.13.0

Bumps auto from 9.12.1 to 9.13.0.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #391 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.12.0 to 9.12.1

Bumps auto from 9.12.0 to 9.12.1.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #390 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.11.0 to 9.12.0

Bumps auto from 9.11.0 to 9.12.0.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #389 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.10.8 to 9.11.0

Bumps auto from 9.10.8 to 9.11.0.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #388 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.10.7 to 9.10.8

Bumps auto from 9.10.7 to 9.10.8.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #387 (@dependabot-preview[bot])

Authors: 3


v5.6.8 (Wed Feb 19 2020)

:scroll: Update Public Suffix List

:nut_and_bolt: Dependencies

  • chore(deps): bump @types/jest from 25.1.2 to 25.1.3

Bumps @types/jest from 25.1.2 to 25.1.3.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #384 (@dependabot-preview[bot])

  • chore(deps-dev): bump @types/node from 13.7.2 to 13.7.4

Bumps @types/node from 13.7.2 to 13.7.4.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #383 (@dependabot-preview[bot])

  • chore(deps-dev): bump @types/node from 13.7.1 to 13.7.2

Bumps @types/node from 13.7.1 to 13.7.2.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #381 (@dependabot-preview[bot])

  • chore(deps-dev): bump @ampproject/rollup-plugin-closure-compiler

Bumps @ampproject/rollup-plugin-closure-compiler from 0.21.0 to 0.22.2.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #378 (@dependabot-preview[bot])

  • chore(deps): bump ts-jest from 25.2.0 to 25.2.1

Bumps ts-jest from 25.2.0 to 25.2.1.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #382 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.10.6 to 9.10.7

Bumps auto from 9.10.6 to 9.10.7.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #380 (@dependabot-preview[bot])

  • chore(deps-dev): bump auto from 9.10.5 to 9.10.6

Bumps auto from 9.10.5 to 9.10.6.

Signed-off-by: dependabot-preview[bot] support@dependabot.com #379 (@dependabot-preview[bot])

Authors: 3


v5.6.7 (Sun Feb 16 2020)

:scroll: Update Public Suffix List

Authors: 2


v5.6.6 (Sun Feb 16 2020)

⚠️ Pushed to master

  • clean-up CHANGELOG (@remusao)
  • ci: remove 'released' plugin for auto (@remusao)

Authors: 1


v5.6.1 (Sun Feb 16 2020)

:scroll: Update Public Suffix List

  • tldts-core, tldts-experimental, tldts

:bug: Bug Fix

  • tldts-core, tldts-experimental, tldts
    • fix: handling of ipv6 when 'extractHostname' option is 'false' #256 (@remusao)

⚠️ Pushed to master

  • ci: remove auto base config (@remusao)
  • ci: try to fix publishing (@remusao)
  • tldts-core, tldts-experimental, tldts

:house: Internal

:nut_and_bolt: Dependencies


5.6.3

2019-12-25

  • Update version of public suffix rules.

5.6.2

2019-11-17

  • Update version of public suffix rules.

5.6.1

2019-10-14

  • Fix detection of IPv6 when extractHostname is false #256
    • Allow IPv6 to be specified with or without brackets
    • Make sure detection is case-insensitive

5.6.0

2019-10-12

  • New optimizations #255

    • re-use a unique result object for all methods but parse(...)
    • remove memory allocation + callback in packed hash
    • remove unnecessary calls to indexOf and lastIndexOf in packed hash

    These optimizations result in up to 20% faster invocations of parse(...) and 40% faster invocations of getPublicSuffix(...)when using tldts-experimental. This should also reduce memory pressure in cases where specific methods are used (i.e.: all but parse(...)) since no intermediary result object needs to be allocated.

5.5.0

2019-09-24

  • Add minified esm bundle (alongside umd)
  • Update public suffix ruleset

5.4.1

2019-09-16

  • Update public suffix ruleset

5.4.0

2019-08-29

  • Update public suffix ruleset #231
  • Add new getDomainWithoutSuffix(...) method #231

5.3.2

2019-07-26

  • update public suffix ruleset #207
  • fix source maps #207
  • make sure tslib does not appear in build artifacts #207

5.3.1

2019-07-17

  • clean-up dead folder + update rules #199

5.3.0

2019-07-03

  • change structure of the cliqz/adblocker project into a monorepo #185
    • embrace lerna and yarn workspaces as a way to manage multiple packages
    • split tldts into two packages tldts and tldts-experimental
    • both package inherit from tldts-core which contains the building blocks

5.2.1

2019-07-01

  • ship both cjs and es6 source + only minified bundles #183

5.2.0

2019-06-21

  • Exclude unnecessary files from package.json #177

5.1.0

2019-06-06

  • #164 Update rules + add fast path for experimental bundle as well

5.0.3

2019-05-29

5.0.2

2019-05-24

5.0.1

2019-05-23

5.0.0

2019-05-23

  • Improvements in various areas #149
    • Performance improvements in all methods of public API (up to x2 faster)
      • extractHostname: will now avoid lower-casing the result in some cases
      • extractHostname: handles single or triple '/' after protocol
      • extractHostname: has fast-path for validation of common protocols (e.g. https)
      • isProbablyIpv4: performs first quick check on length of hostname
      • isProbablyIpv6: performs first quick check on length of hostname
      • isValidHostname: make use of charCodeAt instead of codePointAt
      • lookupInTrie: makes use of Trie with more stable structure (faster)
      • lookupInTrie: lazily allocate memory for result
      • suffixLookup: uses fast-path for most common suffixes (massive speed-up)
      • suffixLookup: does not allocate memory for result anymore
      • setDefaults: fast-path in case no argument was provided
      • getSubdomain: fast-path if subdomain is empty
    • Add more options to fine-tune behavior and performance
      • detectIp allows to disable IP check
      • mixedInput allows to specify if we expect a mix of URLs and hostnames as input. If only hostnames are expected then extractHostname can be set to false to speed-up parsing. If only URLs are expected then mixedInputs can be set to false. The mixedInputs is only a hint and will not change the behavior of the library.
      • validateHostname can be set to false to disable validation and speed-up processing further.
    • Check that input is string before parsing
    • Fix support for reserved keywords in hostnames
    • Add tests and bring back coverage to 100%
    • Minified bundle is now also tested with the same suite
    • Migrate utils scripts from bin/ folder to TypeScript
    • Add small tldts cli which can be used to parse URLs
    • Update README with more accurate information

4.0.6

2019-04-15

  • #123 Update Public Suffix Lists to 033221af7f600bcfce38dcbfafe03b9a2269c4cc

4.0.5

2019-03-29

  • #101 Update Public Suffix Lists
  • #101 Update dev dependencies

4.0.4

2019-03-28

  • #100 Update Public Suffix Lists

4.0.3

2019-03-10

  • #82 Update Public Suffix Lists

4.0.2

2019-02-05

  • #36 Update Public Suffix Lists

4.0.1

2019-01-29

4.0.0

2019-01-07

This Release introduces some more optimizations both in size of bundles, memory usage and speed of parsing. Because it introduces some breaking changes in the API results (host renamed into hostname and deletion of the isValid attribute), as well as introducing a new experimental backend (tldts-experimental bundle), this is a major version bump.

  • #16 Optimizations + comparison with other libraries (#16)

    • Optimize Trie into a DAWG (size reduction)
    • Implement comparison with other libraries
    • Implement fast path for valid hostnames as arguments
    • Allow to disable hostname parsing and validation using option
    • Add tests for corner-cases URLs parsing
    • Update README
  • #13 Implement experimental probabilistic packed suffix structure (#13)

    • Implement packed hash probabilistic structure for more compact representation and faster lookups. See ./bin/builders/hashes.js for more details about how it works.
    • Create second bundle (tldts-experimental) making use of this new implementation
    • Simplify hostname validation and remove strict IDNA checks
    • Move lookup implementations into 'lookup' sub-folder
    • Move compiled data into 'lookup/data' sub-folder
    • Refactor suffix list parsing out of builders
    • Handle IDNA hostnames at build-time instead of runtime (by indexing some suffixes multiple times: once puny-coded and once in unicode form)

3.1.1

  • Minify rules and idna files

3.1.0

  • #3 Various optimizations
    • Rules are now shipped in a parsed form in the bundle
    • Rules cannot be updated (opinionated)
    • Trie matching is now iterative
    • All rules are stored in their ASCII form instead of Unicode
    • Use ts-jest to run tests
    • Remove dist folder from source tree
    • Hostname parsing has been optimized
  • #2 Fix isPrivate being undefined
  • #4 Optimize the implementation of options' setDefaults

3.0.2 (2018/10/03 15h46)

3.0.1 (2018/10/02 22:43 +00:00)

3.0.0 (2018/09/18 11:42 +00:00)

  • #1 Tldts - typescript rewrite
    • Introduce two new options to enabled/disabled the Private/ICANN domains.
    • 'allowIcann' set to 'false' will ignore the ICANN section of the list.
    • 'allowPrivate' set to 'false' will ignore the PRIVATE section of the list.
    • Introduce 'lenient' mode for hostname validation.
    • typescript rewrite + toolchain improvements
    • Update travis config
    • Optimizations + idna compaction
    • Allow updating the rules
    • Use minified/optimized version in benchmark
    • Simplify tsconfig

2.3.1 (2018/02/18 17:59 +00:00)

  • #116 Publish bundles to npm (@chrmod)

v2.3.0 (2018/02/02 14:13 +00:00)

  • #108 Add ip validation (@remusao)
  • #113 bundles it for the browser (@srashid5)
  • #105 Activating Open Collective (@oncletom, @xdamman)
  • #115 Use Firefox Headless for CI testing (@oncletom)

v2.2.0 (2017/09/10 08:45 +00:00)

  • #103 API addition proposal + remove redundancy (@remusao)
  • #98 Add a benchmark script to tld.js to measure performance evolution (@remusao, @oncletom)

v2.1.0 (2017/09/01 18:32 +00:00)

  • #97 Implement rules using a trie data structure. (@remusao)

v2.0.0 (2017/07/19 08:36 +00:00)

  • #92 Remove polyfills (#92) (@oncletom)
  • #96 Add support for fully qualified domains (trailing dot in domain name) (#96) (@remusao)
  • #91 Bundle rules.json on prepublish (#91) (@oncletom)
  • #90 Remove bower and component support (#90) (@oncletom)
  • #87 Expose bound methods (#87) (@oncletom)
  • #88 Upgrade development dependencies (#88) (@oncletom)

v1.7.0 (2016/09/13 19:44 +00:00)

  • #84 Add an interactive update system (#84) (@oncletom)
  • #83 Rectify the tldExists("google.google") README example (#83) (@oncletom)

v1.6.3 (2016/09/13 17:07 +00:00)

  • #81 Publish to npm via Travis CI (#81) (@oncletom)
  • #80 Do not require end-users to have npm@2 (#80) (@oncletom)

v1.6.2 (2015/11/17 16:24 +00:00)

  • #72 Update rules to remove support for .an TLD (@oncletom)

v1.6.1 (2015/11/03 09:12 +00:00)

  • #70 Update rules.json (@Kureev)

v1.6.0 (2015/10/26 18:31 +00:00)

  • #67 Expose the updater as a lib function (@oncletom)
  • #68 Add tld.validHosts (@oncletom)

v1.5.5 (2015/10/13 21:04 +00:00)

  • #65 Make sure we do not commit bower_components folder (@oncletom)

v1.5.4 (2015/09/17 10:59 +00:00)

  • #60 Update cleanHostValue so it never returns invalid hostname characters (@myndzi)
  • #62 Adding tests for getPublicSuffix (@oncletom)
  • #61 Build against all major nodejs and iojs versions (@jdesboeufs)

v1.5.3 (2015/06/19 11:09 +00:00)

  • #55 Url parse (@myndzi)

v1.5.2 (2015/01/15 09:56 +00:00)

  • #52 Make rules with no exceptions valid (@GreyKn)

1.5.1 (2014/10/08 11:30 +00:00)

  • #50 93% to 97% CI code coverage. (@oncletom)
  • #49 URL as a parameter in path broke cleanHostValue (@oncletom)
  • #44 Fix typo in README. (@ghostwords)

1.3.3 (2014/05/21 14:39 +00:00)

  • #41 Remove url fragments from host name (@jhnns)

1.3.2 (2014/05/07 08:35 +00:00)

  • #39 Use publicsuffix.org instead of hg.mozilla.org (@Krinkle)

1.3.1 (2014/01/17 13:20 +00:00)

  • #36 Remove grunt dependency (@oncletom)
  • #35 [WIP] tldjs gives inconsistent results (@oncletom)
  • #33 tldjs chokes on weird domains (@oncletom)

1.3.0 (2013/11/07 15:21 +00:00)

  • #32 add support for component.io (@olivoil)
  • #31 Browser feature (@oncletom)
  • #29 Grunt 0.4 and Node 0.10 compatibility (@oncletom)

1.1.2 (2013/01/08 13:31 +00:00)

  • #13 add getSubdomain() (@oncletom)
  • #14 add domainExists() (@oncletom)
  • #24 isValid() does the wrong job (@oncletom)
  • #3 Test Rule object (@oncletom)
  • #23 Bumping request version (@oncletom)

1.1.0 (2012/12/31 12:12 +00:00)

  • #11 rules as regexp (@oncletom)
  • #9 Migrate build task as a Grunt task (@oncletom)

1.0.2 (2012/12/06 15:51 +00:00)

  • #7 checkPublicSuffix('example.example', 'example.example'); is failing (@oncletom)
  • #6 Updated the rules from http://publicsuffix.org/ (@yehezkielbs)