Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tldts

Package Overview
Dependencies
Maintainers
1
Versions
746
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tldts - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

6

CHANGELOG.md

@@ -5,2 +5,8 @@ ## Change Log

### 5.0.1
*2019-05-23*
- [#150](https://github.com/remusao/tldts/pull/150) Update Public Suffix Lists to [7697e3c](https://github.com/publicsuffix/list/commit/7697e3c95a8bb61831d5b4df1f9c942e2095faba)
### 5.0.0

@@ -7,0 +13,0 @@

2

package.json
{
"name": "tldts",
"description": "Library to work against complex domain names, subdomains and URIs.",
"version": "5.0.0",
"version": "5.0.1",
"homepage": "https://github.com/remusao/tldts",

@@ -6,0 +6,0 @@ "author": "Rémi Berson",

@@ -30,3 +30,18 @@ # tldts - Blazing Fast URL Parsing

Using the command-line interface:
```js
$ npx tldts 'http://www.writethedocs.org/conf/eu/2017/'
{
"domain": "writethedocs.org",
"hostname": "www.writethedocs.org",
"isIcann": true,
"isIp": false,
"isPrivate": false,
"publicSuffix": "org",
"subdomain": "www"
}
```
Programmatically:
```js
const { parse } = require('tldts');

@@ -165,2 +180,18 @@

### getHostname(url | hostname, options?)
Returns the hostname from a given string.
```javascript
const { getHostname } = require('tldts');
getHostname('google.com'); // returns `google.com`
getHostname('fr.google.com'); // returns `fr.google.com`
getHostname('fr.google.google'); // returns `fr.google.google`
getHostname('foo.google.co.uk'); // returns `foo.google.co.uk`
getHostname('t.co'); // returns `t.co`
getHostname('fr.t.co'); // returns `fr.t.co`
getHostname('https://user:password@example.co.uk:8080/some/path?and&query#hash'); // returns `example.co.uk`
```
### getDomain(url | hostname, options?)

@@ -243,5 +274,3 @@

`tldts` is the *fastest JavaScript library* available for parsing
hostnames. It is able to parse up to **2M hostnames per second** on a
modern i7-8550U CPU with Node.js version 11.6.0.
`tldts` is the *fastest JavaScript library* available for parsing hostnames. It is able to parse *millions of inputs per second* (typically 2-3M depending on your hardware and inputs). It also offers granular options to fine-tune the behavior and performance of the library depending on the kind of inputs you are dealing with (e.g.: if you know you only manipulate valid hostnames you can disable the hostname extraction step with `{ extractHostname: false }`).

@@ -248,0 +277,0 @@ Please see [this detailed comparison](./comparison/comparison.md) with other available libraries.

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc