Check if a string represent a fully qualified domain name.
npm install --save is-fqdn
const isFQDN = require("is-fqdn");
console.log(isFQDN("www.parro.it"));
// true
console.log(isFQDN("256.0.0.0"));
// false
console.log(isFQDN("s!ome.com"));
// false
The MIT License (MIT)
Copyright (c) 2016 Andrea Parodi