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

mailparser

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailparser - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

25

lib/mailparser.js

@@ -287,3 +287,3 @@ "use strict";

textContent = ["text/plain", "text/html"].indexOf(this._currentNode.meta.contentType || "") >= 0;
textContent = ["text/plain", "text/html", "text/calendar"].indexOf(this._currentNode.meta.contentType || "") >= 0;

@@ -400,3 +400,3 @@ // detect if this is an attachment or a text node (some agents use inline dispositions for text)

// handle text or attachment line
if(["text/plain", "text/html"].indexOf(this._currentNode.meta.contentType || "")>=0 &&
if(["text/plain", "text/html", "text/calendar"].indexOf(this._currentNode.meta.contentType || "")>=0 &&
!this._currentNode.attachment){

@@ -641,2 +641,7 @@ this._handleTextLine(line);

if(value.method){
this._currentNode.meta.method = value.method;
}
if(!this._currentNode.meta.fileName && (fileName = this._detectFilename(value))){

@@ -917,3 +922,3 @@ this._currentNode.meta.fileName = fileName;

this.mailData = {html:[], text:[], attachments:[]};
this.mailData = {html:[], text:[], calendar:[], attachments:[]};

@@ -946,2 +951,10 @@ if(!this.mimeTree.meta.mimeMultipart){

if(this.mailData.calendar.length){
returnValue.alternatives = [];
for(i=0, len=this.mailData.calendar.length; i<len; i++){
returnValue.alternatives.push(this.mailData.calendar[i].content);
}
}
returnValue.headers = this.mimeTree.parsedHeaders;

@@ -1051,2 +1064,8 @@

return;
case "text/calendar":
if(node.content){
node.meta.content = node.content;
}
this.mailData.calendar.push({content: node.meta || {}, level: level});
return;
}

@@ -1053,0 +1072,0 @@ }else{

2

package.json
{
"name": "mailparser",
"description": "Asynchronous and non-blocking parser for mime encoded e-mail messages",
"version": "0.4.1",
"version": "0.4.2",
"author" : "Andris Reinman",

@@ -6,0 +6,0 @@ "maintainers":[

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