23 lines
840 B
JavaScript
23 lines
840 B
JavaScript
"use strict";
|
|
var QuotedPrintableDecoder = (function () {
|
|
function QuotedPrintableDecoder(nativeLibraryWrapperService) {
|
|
this.nativeLibraryWrapperService = nativeLibraryWrapperService;
|
|
}
|
|
QuotedPrintableDecoder.prototype.getDisplayname = function () {
|
|
return "Decode quoted printable";
|
|
};
|
|
QuotedPrintableDecoder.prototype.getId = function () {
|
|
return "decodequotedprintable";
|
|
};
|
|
QuotedPrintableDecoder.prototype.convert = function (input) {
|
|
try {
|
|
return this.nativeLibraryWrapperService.quotedPrintable.decode(input);
|
|
}
|
|
catch (error) {
|
|
throw new Error("The input can not be interpreted as quoted-printable. May be corrupt?");
|
|
}
|
|
};
|
|
return QuotedPrintableDecoder;
|
|
}());
|
|
exports.QuotedPrintableDecoder = QuotedPrintableDecoder;
|