tldts

JavaScript Library to extract domains, subdomains and public suffixes from complex URIs.

MIT License

Downloads
16.4M
Stars
482
Committers
22

Bot releases are hidden (Show)

tldts - v5.6.0

Published by remusao about 5 years ago

  • 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.

tldts - v5.5.0

Published by remusao about 5 years ago

  • Add minified esm bundle (alongside umd)
  • Update public suffix ruleset
tldts - v5.4.0

Published by remusao about 5 years ago

  • Update public suffix ruleset #231
  • Add new getDomainWithoutSuffix(...) method #231
tldts - v5.3.2

Published by remusao over 5 years ago

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

Thanks to @osdiab for catching and reporting the issue with tslib.

tldts - v5.3.1

Published by remusao over 5 years ago

  • clean-up dead folder + update rules #199
tldts - v5.2.1

Published by remusao over 5 years ago

  • ship both cjs and es6 source + only minified bundles #183
tldts - v5.2.0

Published by remusao over 5 years ago

  • Exclude unnecessary files from package.json #177
tldts - v5.1.0

Published by remusao over 5 years ago

  • #164 Update rules + add fast path for experimental bundle as well
tldts - v5.0.3

Published by remusao over 5 years ago

tldts - v5.0.2

Published by remusao over 5 years ago

tldts - v5.0.1

Published by remusao over 5 years ago

tldts - v5.0.0

Published by remusao over 5 years ago

  • 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
tldts - v4.0.6

Published by remusao over 5 years ago

  • #123 Update Public Suffix Lists to 033221af7f600bcfce38dcbfafe03b9a2269c4cc
tldts - v4.0.5

Published by remusao over 5 years ago

  • #101 Update Public Suffix Lists
  • #101 Update dev dependencies
tldts - v4.0.4

Published by remusao over 5 years ago

  • #100 Update Public Suffix Lists
tldts - v4.0.3

Published by remusao over 5 years ago

  • #82 Update Public Suffix Lists
tldts - v4.0.2

Published by remusao over 5 years ago

  • Update public suffix list to 5d3dfdf7f074ca2831d7c2413cf50b976a019a39
tldts - v4.0.1

Published by remusao over 5 years ago

tldts - v4.0.0

Published by remusao almost 6 years ago

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)
tldts - v3.1.2

Published by remusao almost 6 years ago

  • Fix bundles