Recently I needed to validate http links with Node. I thought this should be
easy, and it is. Luckily for us, Node has a built in URL module that can help us
to this.
This is the snippet(not the final one):
const URL = require('url').URL
// 1
function validateUrl(