Add encodebase64/decodebase64 operators

Proposed by @ericshulman
This commit is contained in:
jeremy@jermolene.com
2023-02-02 09:55:54 +00:00
parent f249b79e81
commit 89fd8871b6
4 changed files with 67 additions and 0 deletions
+16
View File
@@ -16,6 +16,22 @@ Filter operator for applying decodeURIComponent() to each item.
Export our filter functions
*/
exports.decodebase64 = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
results.push($tw.utils.base64Decode(title));
});
return results;
};
exports.encodebase64 = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
results.push($tw.utils.base64Encode(title));
});
return results;
};
exports.decodeuricomponent = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {