Extract Email Domain Name
๐ฆ Simple Utility to Extract the domain from an email address.
๐ฆ Requirements
- Node.js 12X LTS or 14X LTS ๐ฆ
โจ Installation
- Install the NPM Package with the below command:
npm install extract-email-domain --save
(or)
- Install with Yarn:
yarn add extract-email-domain
๐๏ธ Usage
- Import the module in your project:
// Commonjs Import
var extractDomain = require("extract-email-domain");
// or ES6 import
import extractDomain from "extract-email-domain";
๐ก Example
- Import the module in your project
- Pass the email address to the function
var extractDomain = require("extract-email-domain");
myEmail = "[email protected]";
const getEmail = extractDomain(myEmail);
console.log(getEmail);
โ๏ธ Example Output
mcnaveen.com
๐ Message
I hope you find this useful. If you have any questions, please create an issue.