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
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

address-rfc2822 - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

4

Changes.md
## 2.0.4 - 2018-06-29
- throw a proper error object, not a string.
## 2.0.3 - 2018-03-01

@@ -3,0 +7,0 @@

4

index.js

@@ -6,3 +6,3 @@ 'use strict';

exports.parse = function parse (line, startAt) {
if (!line) throw 'Nothing to parse';
if (!line) throw new Error('Nothing to parse');

@@ -21,3 +21,3 @@ line = line.trim();

if (!addr) throw 'No results';
if (!addr) throw new Error('No results');

@@ -24,0 +24,0 @@ // console.log("Parsed to: ", require('util').inspect(addr, {depth: 10, colors: true}));

{
"name": "address-rfc2822",
"version": "2.0.3",
"version": "2.0.4",
"description": "RFC 2822 (Header) email address parser",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -59,2 +59,14 @@ const address = require('../index');

test.done();
},
'root (Cron Daemon)': function (test) {
test.expect(1);
try {
const r = address.parseFrom('root (Cron Daemon)');
test.equal(r[0].address, '');
// console.log(r);
}
catch (e) {
test.equal(e.message, 'No results');
}
test.done();
}

@@ -61,0 +73,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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