validate-tld

Determine whether a given TLD is valid according to IANA

Usage no npm install needed!

<script type="module">
  import validateTld from 'https://cdn.skypack.dev/validate-tld';
</script>

README

validate-tld

A lightweight node module for validating whether is a provided string is an IANA recognized top level domain CircleCI

Installation

npm install --save validate-tld

Usage

const ValidateTLD = require('validate-tld')({cacheTTL: 60});
const valid = await ValidateTLD.validate('com'); // true