get-emails
v4.0.0
Published
Get all email addresses in a string
Downloads
5,681
Maintainers
Readme
get-emails
Get all email addresses in a string
Install
$ npm install get-emails
Usage
import getEmails from 'get-emails';
const text = 'Lorem ipsum dolor, [email protected] consectetuer [email protected] elit.';
getEmails(text);
//=> Set {'[email protected]', '[email protected]'}
If the string comes from user input, it's up to you to limit it to some reasonable length to prevent abuse.
Related
- get-emails-cli - CLI for this module