Add util.print_debug_hexarray_dump
This commit is contained in:
parent
f40489aa43
commit
cc4cc38fe7
14
src/util.js
14
src/util.js
|
@ -362,6 +362,20 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper function to print a debug message. Debug
|
||||
* messages are only printed if
|
||||
* @link module:config/config.debug is set to true.
|
||||
* Different than print_debug because will call Uint8Array_to_hex iff necessary.
|
||||
* @param {String} str String of the debug message
|
||||
*/
|
||||
print_debug_hexarray_dump: function (str, arrToHex) {
|
||||
if (config.debug) {
|
||||
str += ': ' + util.Uint8Array_to_hex(arrToHex);
|
||||
console.log(str);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper function to print a debug message. Debug
|
||||
* messages are only printed if
|
||||
|
|
Loading…
Reference in New Issue
Block a user