Comparing version 5.0.0 to 5.0.1
@@ -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 @@ |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1576201
8694
315
0