mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-13 13:25:42 +00:00
Introduce <$action-log> widget to help debugging action strings
This commit is contained in:
@@ -53,6 +53,19 @@ exports.warning = function(text) {
|
||||
exports.log(text,"brown/orange");
|
||||
};
|
||||
|
||||
/*
|
||||
Log a table of name: value pairs
|
||||
*/
|
||||
exports.logTable = function(data,columnNames) {
|
||||
if(console.table) {
|
||||
console.table(data,columnNames);
|
||||
} else {
|
||||
$tw.utils.each(data,function(value,name) {
|
||||
console.log(name + ": " + value);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Return the integer represented by the str (string).
|
||||
Return the dflt (default) parameter if str is not a base-10 number.
|
||||
|
||||
Reference in New Issue
Block a user