mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2025-12-06 02:30:46 -08:00
Introduce <$action-log> widget to help debugging action strings
This commit is contained in:
parent
02a956b1bb
commit
1b31c25ea7
3 changed files with 93 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue