normalize-email-or-url
v2.0.1
Published
Return normalized email or url from a string.
Readme
normalize-email-or-url
Return normalized email or url from a string.
Installation
npm install normalize-email-or-url --saveor
yarn add normalize-email-or-urlUsage
const norm = require('normalize-email-or-url')
const { url, error } = norm('example.com')
// => url = http://example.com
const { email, error } = norm('[email protected]')
// => email = [email protected]