New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

address-rfc2822

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

address-rfc2822

RFC 2822 (Header) email address parser

2.0.1
Source
npm
Version published
Weekly downloads
6.1K
-0.44%
Maintainers
2
Weekly downloads
 
Created
Source

Build Status Win Build status Code Climate Coverage Status Dependencies Greenkeeper badge

address-rfc2822

Parser for RFC2822 (Header) format email addresses.

This module parses RFC2822 headers containing addresses such as From, To, CC, and Bcc headers.

It is almost a direct port of the perl module Mail::Address and I'm grateful to the original authors of that module for the clean code and the tests.

Installation

npm install address-rfc2822

Usage

var addrparser = require('address-rfc2822');

var addresses = addrparser.parse("Matt Sergeant <helpme+npm@gmail.com>");
var address = addresses[0];

console.log("Email address: " + address.address);
console.log("Email name: " + address.name());
console.log("Reformatted: " + address.format());
console.log("User part: " + address.user());
console.log("Host part: " + address.host());

License

This module is MIT licensed.

Keywords

email

FAQs

Package last updated on 26 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts