3.0.1 • Published 12 months ago

domain-tld-validator v3.0.1

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

Domain TLD Validator

This package provides a simple function to validate domain names based on general domain formatting rules and Top-Level Domain (TLD) verification. It checks whether a given domain is correctly formatted and contains a valid TLD.

Installation

npm install domain-tld-validator

Usage

import { validateDomain } from "domain-tld-validator";

console.log(validateDomain("google.com")); // true
console.log(validateDomain("sub.google.com")); // true
console.log(validateDomain("go-ogle.com")); // true

console.log(validateDomain("goo gle.com")); // false
console.log(validateDomain("google.com.")); // false
console.log(validateDomain("google.whatever123")); // false
3.0.1

12 months ago

3.0.0

12 months ago

2.2.0

12 months ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago