Skip to content
This repository was archived by the owner on Jul 30, 2022. It is now read-only.
This repository was archived by the owner on Jul 30, 2022. It is now read-only.

Wildcard option with TLDs #31

@cyrilwanner

Description

@cyrilwanner

It looks like the wildcard option cannot be used together with the topLevel option.

const isValidDomain = require('is-valid-domain')

isValidDomain('ch', {topLevel: true, subdomain: true})  // -> true
isValidDomain('*.ch', {topLevel: true, wildcard: true, subdomain: true})  // -> false

// one from sldMap.json has the same problem:
isValidDomain('gov.sg', {topLevel: true, subdomain: true})  // -> true
isValidDomain('*.gov.sg', {topLevel: true, wildcard: true, subdomain: true})  // -> false

Is this a bug or something that can be supported in the future? Either with those options or a new specific one (e.g. secondLevelWildcard)?
Thank you already for your feedback!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions