Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tlds

Package Overview
Dependencies
Maintainers
4
Versions
254
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tlds

A list of TLDs.

  • 1.210.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4M
decreased by-4.09%
Maintainers
4
Weekly downloads
 
Created

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

Keywords

FAQs

Package last updated on 26 Sep 2020

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc