Commit 8bb4a56dbe5e93628a52ae3c5ca8036755aea00f
add lazy defaults for debug functions
wanderer committed on 8/5/2016, 4:31:59 PMParent: bea202f2fdf8d657062f28fac0fbd23060d6fad3
Files changed
debugInterface.js | changed |
debugInterface.js | ||
---|---|---|
@@ -22,13 +22,13 @@ | ||
22 | 22 | } |
23 | 23 | |
24 | 24 | get exportTable () { |
25 | 25 | return { |
26 | - 'print': function (offset, length) { | |
26 | + 'print': function (offset = 0, length = 100) { | |
27 | 27 | console.log(`<DEBUG(str): ${Uint8ArrayToString(new Uint8Array(this.module.exports.memory, offset, length))}>`) |
28 | 28 | }.bind(this), |
29 | 29 | |
30 | - 'printHex': function (offset, length) { | |
30 | + 'printHex': function (offset = 0, length = 100) { | |
31 | 31 | console.log(`<DEBUG(hex): ${Uint8ArrayToHexString(new Uint8Array(this.module.exports.memory, offset, length))}>`) |
32 | 32 | }.bind(this) |
33 | 33 | } |
34 | 34 | } |
Built with git-ssb-web