Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 574 Bytes

README.md

File metadata and controls

30 lines (25 loc) · 574 Bytes

Domain-Namer

Generate and validate fully qualified domain names and more!

Installation

npm install domain-namer --save
yarn add domain-namer
bower install domain-namer --save

Usage

Javascript

const DomainPatterns = require("domain-namer").DomainPatterns;
console.log(DomainPatterns.fqdn.test("google.com"));
// Should print out 'true'

Typescript

import { DomainPatterns } from "domain-namer";
console.log(DomainPatterns.topLevelDomain.test("com"));
// Should print out 'true'

Test

npm run test