Skip to content
Parse e-mail address fields with node.js
Find file
Latest commit a0c7c66 @andris9 andris9 v1.0.1
Failed to load latest commit information.
lib v1.0.1
test v1.0.1
.eslintrc.js v1.0.1
.gitignore Bumped version to v0.3.0
.npmignore v1.0.0
.travis.yml v1.0.0 v1.0.1
Gruntfile.js v1.0.0
LICENSE v1.0.0 Allow semicolon as list delimiter. Bumped version to v0.3.2
package.json v1.0.1


Parse e-mail address fields. Input can be a single address (""), a formatted address ("Andris Reinman <>"), comma separated list of addresses (","), an address group (";") 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 ";" is identical to ",".


Install with npm

npm install addressparser


Include the module

var addressparser = require('addressparser');

Parse some address strings with addressparser(field)

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

And when using groups

addressparser('Composers:"Bach, Sebastian" <>, (Mozzie);');

the result would be

        name: "Composers",
        group: [
                address: "",
                name: "Bach, Sebastian"
                address: "",
                name: "Mozzie"

Be prepared though that groups might be nested.


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



Something went wrong with that request. Please try again.