gtlds

2.1.0 • Public • Published

gtlds Build Status codecov

gTLD utilities

A list of all gTLDs from the ICANN registry, including the registry operator and whether the gTLD has been terminated.

The list is a JSON file and can be used anywhere.

Install

$ npm install gtlds

Usage

const gtlds = require('gtlds');
 
gtlds.random();
/*
{
  "contractTerminated":false,
  "gTLD":"google",
  "registryOperator":"Charleston Road Registry Inc."
}
*/

API

.all

Type: Array

gTLDs in alphabetical order.

.names

Type: Array

gTLD names in alphabetical order.

.random()

Type: Function

Random gTLD.

Updating

A node script is available to sync gTLD data via npm run sync. It will fetch, parse, and overwrite the gtlds.json file.

License

MIT © Chris Vogt

Package Sidebar

Install

npm i gtlds

Weekly Downloads

4

Version

2.1.0

License

MIT

Unpacked Size

118 kB

Total Files

6

Last publish

Collaborators

  • chrisvogt