https://github.com/mcnaveen/extract-email-domain
Simple Utility to Extract the domain from an email address
https://github.com/mcnaveen/extract-email-domain
domain domain-name email email-address email-address-validator email-validation node-module nodejs nodejs-modules
Last synced: 24 days ago
JSON representation
Simple Utility to Extract the domain from an email address
- Host: GitHub
- URL: https://github.com/mcnaveen/extract-email-domain
- Owner: mcnaveen
- License: mit
- Created: 2022-03-02T05:30:30.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-02T05:31:22.000Z (over 4 years ago)
- Last Synced: 2025-01-29T20:49:19.356Z (over 1 year ago)
- Topics: domain, domain-name, email, email-address, email-address-validator, email-validation, node-module, nodejs, nodejs-modules
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/extract-email-domain
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Extract Email Domain Name
:unicorn: Simple Utility to Extract the domain from an email address.


### :package: Requirements
- Node.js 12X LTS or 14X LTS 📦
### :sparkles: Installation
- Install the NPM Package with the below command:
```
npm install extract-email-domain --save
```
(or)
- Install with Yarn:
```
yarn add extract-email-domain
```
### :pen: Usage
- Import the module in your project:
```javascript
// Commonjs Import
var extractDomain = require("extract-email-domain");
// or ES6 import
import extractDomain from "extract-email-domain";
```
### :bulb: Example
- Import the module in your project
- Pass the email address to the function
```javascript
var extractDomain = require("extract-email-domain");
myEmail = "me@mcnaveen.com";
const getEmail = extractDomain(myEmail);
console.log(getEmail);
```
### :ballot_box_with_check: Example Output
```
mcnaveen.com
```
---
#### :green_heart: Message
I hope you find this useful. If you have any questions, please create an issue.