Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@puresec/addressparser-malicious

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@puresec/addressparser-malicious

Parse e-mail addresses

  • 1.0.2
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
3
Weekly downloads
 
Created
Source

MALICIOUS PACKAGE CREATED FOR TEST PURPOSES - DO NOT INSTALL

addressparser

Parse e-mail address fields. Input can be a single address ("andris@kreata.ee"), a formatted address ("Andris Reinman <andris@kreata.ee>"), comma separated list of addresses ("andris@kreata.ee, andris.reinman@kreata.ee"), an address group ("disclosed-recipients:andris@kreata.ee;") or a mix of all the formats.

In addition to comma the semicolon is treated as the list delimiter as well (except when used in the group syntax), so a value "andris@kreata.ee; andris.reinman@kreata.ee" is identical to "andris@kreata.ee, andris.reinman@kreata.ee".

Installation

Install with npm

npm install addressparser

Usage

Include the module

var addressparser = require('addressparser');

Parse some address strings with addressparser(field)

var addresses = addressparser('andris <andris@tr.ee>');
console.log(addresses); // [{name: "andris", address:"andris@tr.ee"}]

And when using groups

addressparser('Composers:"Bach, Sebastian" <sebu@example.com>, mozart@example.com (Mozzie);');

the result would be

[
    {
        name: "Composers",
        group: [
            {
                address: "sebu@example.com",
                name: "Bach, Sebastian"
            },
            {
                address: "mozart@example.com",
                name: "Mozzie"
            }
        ]
    }
]

Be prepared though that groups might be nested.

Notes

This module does not decode any mime-word or punycode encoded strings, it is only a basic parser for parsing the base data, you need to decode the encoded parts later by yourself

License

MIT

FAQs

Package last updated on 04 Oct 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc