https://github.com/eneoli/domain-check
A promise based lib to check if a domain name is available or not
https://github.com/eneoli/domain-check
check domain domain-check javascript js tool ts typescript web whois
Last synced: about 1 year ago
JSON representation
A promise based lib to check if a domain name is available or not
- Host: GitHub
- URL: https://github.com/eneoli/domain-check
- Owner: eneoli
- Created: 2019-08-11T16:34:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T18:34:31.000Z (over 3 years ago)
- Last Synced: 2025-04-25T18:55:58.809Z (about 1 year ago)
- Topics: check, domain, domain-check, javascript, js, tool, ts, typescript, web, whois
- Language: JavaScript
- Size: 121 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# domain-check [](https://travis-ci.org/EneOli/domain-check)
domain-check is a node module using promises allowing to check if a domain is free to register or not
# Installation
```bash
npm install domain-check --save
yarn add domain-check
bower install domain-check --save
```
# Usage
To check if a domain is free you can create a new `Domain` object...
```js
const domainCheck = require('domain-check');
const Domain = domainCheck.Domain;
...
const domain = new Domain('google.de');
console.log(await domain.isFree());
```
or use the static method `isFree` of the Domain class
```js
const Domain = require('domain-check').Domain;
...
const isFree = await Domain.isFree('google.de');
console.log(isFree);
```
# Known issues
It might be that the module shows an registered domain as available to register. This is because the underlying library [node-whois](https://github.com/FurqanSoftware/node-whois) can not handle newer tlds. A fix is in progress.