Return normalized email or url from a string.
npm install normalize-email-or-url --save
or
yarn add normalize-email-or-url
const norm = require('normalize-email-or-url')
const { url, error } = norm('example.com')
// => url = http://example.com
const { email, error } = norm('joe@example.com')
// => email = joe@example.com