jedireza / reserved-subdomains

:package: A list of names that should be reserved in multitenant apps.

Home Page:https://www.npmjs.com/package/reserved-subdomains

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reserved-subdomains

A list of names that should be reserved in multitenant apps.

Install

$ npm install reserved-subdomains

API reference

Properties

names

An array of strings. Ex: ['www', 'ftp', 'mail', ...].

nameMap

An object where keys are names. Ex: { www: true, ftp: true, mail: true, ...}.

patterns

An array of regular expression strings. Ex: ['ww[a-z0-9-]+', 'ftp[0-9]+', 'mail[0-9]+', ...].

patternsRegex

An array of regular expression objects. Ex: [/ww[a-z0-9-]+/, /ftp[0-9]+/, /mail[0-9]+/, ...].

Methods

isNotValid(name)

Returns true if the name is not valid where:

  • name - the name to test.

isValid(name)

Returns true if the name is valid where:

  • name - the name to test.

Inspired by

https://github.com/nkkollaw/reserved-subdomains

License

MIT

About

:package: A list of names that should be reserved in multitenant apps.

https://www.npmjs.com/package/reserved-subdomains

License:MIT License


Languages

Language:JavaScript 100.0%