Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

RunKit + npm:

node v8.17.0
version: 1.0.2
endpointsharetweet
tldjs Node.js module written in JavaScript to work against complex domain names, subdomains and well-known TLDs. Read more about the project on https://www.npmjs.com/tldjs. Report any issues or questions on https://github.com/oncletom/tld.js
const {parse, tldExists} = require('tldjs'); // Checking only if TLD exists in URL or hostname // First TLD exists; the second does not. console.log(tldExists('https://www.bbc')); console.log(tldExists('tld.unknown')); // Retrieving hostname related informations of a given URL parse('http://www.writethedocs.org/conf/eu/2017/');
Loading…

no comments

    sign in to comment