1.5.3 • Published 5 months ago

domain-lookup v1.5.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Domain Lookup šŸš€

A powerful CLI tool to check domain name availability using WHOIS. Supports checking multiple domains at the same time. Works both as a CLI tool and as a Node.js module.

NPM Version
Downloads
License


šŸ“¦ Installation

Install globally via npm:

npm install -g domain-lookup

Or using yarn:

yarn global add domain-lookup

Or install it in a Node.js project:

npm install domain-lookup

šŸš€ Usage

šŸ” Check a Single Domain in CLI

You can check the availability of a single domain using the following command:

domain-lookup google.com

If the domain is available, you will see:

āœ… google.com is Available!

If the domain is not available, you will see:

āŒ google.com is Not Available!

šŸ“‚ Checking Multiple Domains at the Same Time in CLI

You can check multiple domains at once by providing a .txt file containing a list of domain names.

Step 1: Create a .txt File

Create a text file (e.g., domains.txt) and list the domains you want to check, one per line:

google.com
mywebsite.net
randomdomain.org
example.io

Step 2: Run the Command

Run the following command to check all domains listed in the file:

domain-lookup -f domains.txt

Step 3: Get the Results

After running the command, you will see an output like this:

āœ… mywebsite.net is Available!
āŒ google.com is Not Available!
āœ… randomdomain.org is Available!
āŒ example.io is Not Available!

šŸ“Œ This allows you to quickly scan multiple domains without having to check them one by one! šŸš€


šŸ“œ Using in a Node.js Project

Install the package

npm install domain-lookup

Import the module

const { checkDomain, checkDomainsFromFile } = require("domain-lookup");

Check a single domain

checkDomain("example.com")
  .then(() => console.log("Check complete!"))
  .catch(err => console.error("Error:", err));

Check multiple domains from a file

checkDomainsFromFile("domains.txt")
  .then(() => console.log("Batch check complete!"))
  .catch(err => console.error("Error:", err));

šŸ“Œ You can now use domain-lookup in any Node.js project! šŸš€


šŸ“œ API Reference

checkDomain(domain)

Checks a single domain's availability.

checkDomainsFromFile(filePath)

Checks multiple domains listed in a text file.


šŸ› ļø Contributing

Contributions are welcome! Fork the repository, create a branch, make changes, and submit a PR. šŸš€


šŸ“œ License

This project is licensed under the MIT License.


🌟 Support & Contact

šŸš€ Happy Coding! šŸŽ®āœØ