Comparing version 0.2.7 to 0.2.8
@@ -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 @@ |
{ | ||
"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 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
212
648315
776