Socket
Socket
Sign inDemoInstall

tlds

Package Overview
Dependencies
0
Maintainers
2
Versions
252
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

tlds


Version published
Maintainers
2
Install size
40.0 kB
Created

Package description

What is tlds?

The tlds npm package provides a list of top-level domains (TLDs) as recognized by the Internet Assigned Numbers Authority (IANA). This package can be used to validate domain names, parse URLs, and perform operations that require knowledge of valid TLDs.

What are tlds's main functionalities?

Get the full list of TLDs

This feature allows you to retrieve the full list of TLDs. You can use this list to check if a domain's TLD is valid or to enumerate all possible TLDs.

const tlds = require('tlds');
console.log(tlds); // Outputs the array of TLDs

Check if a TLD exists

This feature allows you to check if a specific TLD exists in the list of valid TLDs. This can be useful for validating domain names or filtering user input.

const tlds = require('tlds');
const isTldValid = tlds.includes('com');
console.log(isTldValid); // Outputs true

Other packages similar to tlds

Changelog

Source

1.207.0 / 2019-12-03

  • chore: Update list 03/12/19 (#8)
  • typings: init at 1.203.1 (#6)
  • Update 2018-07-24 (#7)

Readme

Source

tlds

List of TLDs, scraped from ICANN

License

(The MIT License)

Copyright (c) 2013 Stephen Mathieson <me@stephenmathieson.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Last updated on 03 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc