1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-08 03:23:00 +00:00

Added reveal macro

This commit is contained in:
Jeremy Ruston
2012-12-31 18:36:39 +00:00
parent 61eb585640
commit 8fdeefd7d1
8 changed files with 247 additions and 131 deletions

View File

@@ -24,6 +24,17 @@ exports.trim = function(str) {
}
};
/*
Convert a string to base64 encoding
*/
exports.toBase64 = function(str) {
if($tw.browser) {
return window.btoa(str);
} else {
new Buffer(str).toString("base64");
}
};
/*
Return the number of keys in an object
*/