22 lines
587 B
JavaScript
22 lines
587 B
JavaScript
"use strict";
|
|
var Base64Decoder = (function () {
|
|
function Base64Decoder() {
|
|
}
|
|
Base64Decoder.prototype.getDisplayname = function () {
|
|
return "Decode Base 64";
|
|
};
|
|
Base64Decoder.prototype.getId = function () {
|
|
return "base64decode";
|
|
};
|
|
Base64Decoder.prototype.convert = function (input) {
|
|
try {
|
|
return atob(input);
|
|
}
|
|
catch (exception) {
|
|
throw new Error("Could not decode base64 string. Maybe corrupt input?");
|
|
}
|
|
};
|
|
return Base64Decoder;
|
|
}());
|
|
exports.Base64Decoder = Base64Decoder;
|