https://github.com/fridays/is-tld
Returns true if a value is a top-level domain
https://github.com/fridays/is-tld
domain tld
Last synced: 9 months ago
JSON representation
Returns true if a value is a top-level domain
- Host: GitHub
- URL: https://github.com/fridays/is-tld
- Owner: fridays
- License: mit
- Created: 2017-03-14T21:35:44.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-22T18:55:00.000Z (about 9 years ago)
- Last Synced: 2025-08-31T10:51:38.401Z (10 months ago)
- Topics: domain, tld
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# is-tld
[](https://travis-ci.org/fridays/is-tld) [](https://www.npmjs.com/package/is-tld)
Returns `true` if a value is a top-level domain
## Installation
```bash
npm install --save is-tld
```
## Usage
```javascript
const isTld = require('is-tld')
isTld('com') // true
isTld('_') // false
```
## Credits
> [tld-list](https://www.npmjs.com/package/tld-list) A list of all valid top-level domains updated from time to time.