Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mimelib

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mimelib - npm Package Compare versions

Comparing version 0.2.7 to 0.2.8

18

lib/mimelib.js

@@ -322,18 +322,6 @@ var convert = require("encoding").convert,

while(str.match(/(\=\?[\w_\-]+\?[QB]\?[^\?]+\?\=)\s+(?=\=\?[\w_\-]+\?[QB]\?[^\?]+\?\=)/g)){
str = str.replace(/(\=\?[\w_\-]+\?[QB]\?[^\?]+\?\=)\s+(\=\?[\w_\-]+\?[QB]\?[^\?]+\?\=)/g,function(original, first, second){
var match1 = (first || "").trim().match(/^\=\?([\w_\-]+)\?([QB])\?([^\?]+)\?\=$/),
match2 = (second || "").trim().match(/^\=\?([\w_\-]+)\?([QB])\?([^\?]+)\?\=$/);
str = str.
replace(/(=\?[^?]+\?[QqBb]\?[^?]+\?=)\s+(?==\?[^?]+\?[QqBb]\?[^?]+\?=)/g, "$1").
replace(/\=\?([\w_\-]+)\?([QB])\?[^\?]+\?\=/g, (function(mimeWord, charset, encoding){
if(match1[1] == match2[1] && match1[2] == match2[2]){
return "=?"+match1[1]+"?"+match1[2]+"?"+match1[3] + match2[3]+"?=";
}else{
return first+second;
}
});
}
str = str.replace(/\=\?([\w_\-]+)\?([QB])\?[^\?]+\?\=/g, (function(mimeWord, charset, encoding){
curCharset = charset + encoding;

@@ -340,0 +328,0 @@

2

package.json
{
"name": "mimelib",
"description": "MIME functions to encode/decode e-mails etc.",
"version": "0.2.7",
"version": "0.2.8",
"author" : "Andris Reinman",

@@ -6,0 +6,0 @@ "homepage":"http://github.com/andris9/mimelib",

@@ -196,2 +196,18 @@ # mimelib

mimelib.contentTypes["xls"]; // "application/vnd.ms-excel"
mimelib.contentTypes["xls"]; // "application/vnd.ms-excel"
## iconv support
By default only iconv-lite support is bundled. If you need node-iconv support, you need to add it
as an additional dependency for your project:
...,
"dependencies":{
"mimelib": "*",
"iconv": "*"
},
...
## License
mimelib license is

@@ -100,2 +100,3 @@ var testCase = require('nodeunit').testCase,

test.equal("Jõge-vaŽ zz Jõge-vaŽJõge-vaŽJõge-vaŽ", mimelib.parseMimeWords("=?ISO-8859-13?Q?J=F5ge-va=DE?= zz =?ISO-8859-13?Q?J=F5ge-va=DE?= =?ISO-8859-13?Q?J=F5ge-va=DE?= =?ISO-8859-13?Q?J=F5ge-va=DE?="))
test.equal("Sssś Lałalalala", mimelib.parseMimeWords("=?UTF-8?B?U3NzxZsgTGHFgmFsYQ==?= =?UTF-8?B?bGFsYQ==?="));
test.done();

@@ -102,0 +103,0 @@ },

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