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

emlx2json

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emlx2json - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

utils.js

41

lib/emlx2json.js

@@ -100,6 +100,2 @@ /*

function getBodyParts(content) {
return content.split(/(\t|\n|\s)boundary=.*?$/gi);
}
function parseKeyValuePairs(keys, header) {

@@ -159,37 +155,2 @@

function getBodyParts(body, contentTypeBoundaries) {
if (contentTypeBoundaries.length === 0)
return body.replace(/(\s+|\n+)$/g, "");
var bodyLines = body.split(/\n/g);
var parts = [
[]
];
var currentPartIndex = 0;
for (var i in bodyLines) {
for (var x = 0; x < contentTypeBoundaries.length; x++) {
if (bodyLines[i].indexOf(contentTypeBoundaries[x]) !== -1) {
currentPartIndex++;
parts[currentPartIndex] = [];
} else {
var curIndex = parts[currentPartIndex].length - 1;
if (parts[currentPartIndex][curIndex] !== bodyLines[i]) {
var l = bodyLines[i];
for (var z in contentTypeBoundaries) {
l = l.replace(eval("/^(-+|)" + escapeSpecialChars(contentTypeBoundaries[z]) + ".*?(\\n|$)/g"), "");
}
parts[currentPartIndex].push(l);
}
}
}
}
var items = _.map(parts, function (item) {
return item.join("\n");
})
return items;
}
function parseBodyParts(body, contentTypeBoundaries) {

@@ -199,3 +160,3 @@ var items = [];

_.map(bodyParts, function (bodyPart) {
var item = parseSingleBodyPart(bodyPart);
var item = parseSingleBodyPart("Content-" + bodyPart);
if ((Object.keys(item.headers).length > 0 && item.body.length > 0))

@@ -202,0 +163,0 @@ items.push(item);

{
"name": "emlx2json",
"version": "0.0.8",
"version": "0.0.9",
"description": "JSON parser for Apple Mail (Mail.app) messages (.emlx)",

@@ -18,3 +18,3 @@ "dependencies": {

"main": "lib/emlx2json.js",
"_id": "emlx2json@0.0.8"
"_id": "emlx2json@0.0.9"
}
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