JSPM

tldts-experimental

7.0.7
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 82696
  • Score
    100M100P100Q165827F
  • License MIT

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

Package Exports

  • tldts-experimental
  • tldts-experimental/dist/cjs/index.js
  • tldts-experimental/dist/es6/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tldts-experimental) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

tldts-experimental

faster, experimental, unstable version of tldts. It exposes the exact same API and is subjected to the same tests as the main library, but offers a different trade-off in terms of space, speed and accuracy.

See README.md from tldts for more details about the API.

Differences with tldts

The default tldts package is what you should use most of the time and what is imported out of the box. It makes use of an optimized DAWG (direct acyclic word graph) data-structure and delivers very good performances. If that is not enough, you can try the tldts-experimental package which implements a probabilistic data-structure. It is:

  • Must smaller (in terms of bundle size and memory footprint)
  • Loads instantly (no data loading or parsing required)
  • Much faster (lookups are up to 1.5-2x faster)

The drawback is that there might be some unlikely false positive (think bloom filters).

For more details, check the documentation from the following files: