question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TLDs do not match IANA list

See original GitHub issue

We use chance extensively for generating test data for API calls. We have come across issues where chance.email() is generating invalid emails, based on validation requirements that the email should have a valid IANA TLD.

Examples of this:

  1. TLD: ‘an’ - this tld was retired in 2010
  2. TLD: ‘bq’ - this tld is listed as a “country code”, but has not been assigned so is currently not a valid TLD.

While I wouldn’t expect chance to maintain a list in parity with IANA, I would love to see one of two updates:

  1. Remove any invalid IANA values from the tlds list.
  2. Update tlds to match the current IANA list.

I’m willing to submit a PR for either, but I’m not sure which (if either) would be the preferred approach.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
diogocamposcommented, Jan 10, 2020

Hi there, I’m also getting random test failures with Joi, just as described by @TimBailey-pnk above, even after updating to 1.1.4

1reaction
victorquinncommented, Dec 5, 2019

FYI this is fixed and published on npm as 1.1.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Root Zone Database - Internet Assigned Numbers Authority
Domain Type TLD Manager .aaa generic American Automobile Association, Inc. .aarp generic AARP .abarth generic Fiat Chrysler Automobiles N.V.
Read more >
List of Internet top-level domains - Wikipedia
As of March 2021, the IANA root database includes 1589 TLDs. That also includes 68 that are not assigned (revoked), 8 that are...
Read more >
IANA TLD Delegation Practices
It DOES NOT reflect any changes in policy affecting the administration of DNS ... A list of current TLD assignments and names of...
Read more >
What Is a TLD? All You Need to Know About Top Level Domains
A top-level domain (TLD), also known as a domain extension, is the ... added to the top-level domain list in the Internet Assigned...
Read more >
What is a regular expression which will match a valid domain ...
Often forgotten: For full qualified domain names you should match a period after the tld. – schmijos. Nov 13, 2013 at 13:45. 1....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found