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.2.6 to 0.2.7

22

lib/mailparser.js

@@ -85,3 +85,7 @@

* Line counter for debugging
* @private */ this._linecounter = 0;
* @private */ this._lineCounter = 0;
/**
* Did the last chunk end with \r
* @private */ this._lineFeed = false;
}

@@ -129,5 +133,13 @@ // inherit methods and properties of Stream

if(chunk){
this._remainder += chunk.toString("binary");
chunk = chunk && chunk.toString("binary") || "";
// if the last chunk ended with \r and this one begins
// with \n, it's a split line ending. Since the last \r
// was already used, skip the \n
if(this._lineFeed && chunk.charAt(0) == "\n"){
chunk = chunk.substr(1);
}
this._lineFeed = chunk.substr(-1) == "\r";
this._remainder += chunk;

@@ -170,3 +182,3 @@ process.nextTick(this._process.bind(this, true));

if(this.options.debug){
console.log("LINE " + (++this._linecounter) + " ("+this._state+"): "+line);
console.log("LINE " + (++this._lineCounter) + " ("+this._state+"): "+line);
}

@@ -196,2 +208,4 @@

}
};

@@ -198,0 +212,0 @@

2

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

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

var MailParser = require("../lib/mailparser").MailParser,
mailparser = new MailParser();
mailparser = new MailParser({
debug: true
});

@@ -8,3 +10,4 @@ var email = "From: 'Sender Name' <sender@example.com>\r\n"+

"\r\n"+
"How are you today?";
"How are you today?\r\n"+
"Another line of text";

@@ -18,4 +21,6 @@ // setup an event listener when the parsing finishes

// send the email source to the parser
mailparser.write(email);
// send the email source to the parser, char by char
for(var i=0, len=email.length; i<len; i++){
mailparser.write(email.charAt(i));
}
mailparser.end();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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