JavaScript Library to extract domains, subdomains and public suffixes from complex URIs.
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] over 1 year ago
master
Published by github-actions[bot] over 1 year ago
tldts
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
tldts-core
, tldts-experimental
, tldts
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
tldts-core
, tldts-experimental
, tldts-utils
, tldts
Published by github-actions[bot] over 1 year ago
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
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.
tldts-core
, tldts-experimental
, tldts
tldts-core
, tldts-experimental
, tldts
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago