Add inspect method to Opcode.
This commit is contained in:
parent
fcd89b8dd7
commit
5bb750252d
@ -233,4 +233,13 @@ Opcode.isSmallIntOp = function(opcode) {
|
|||||||
((opcode >= Opcode.map.OP_1) && (opcode <= Opcode.map.OP_16)));
|
((opcode >= Opcode.map.OP_1) && (opcode <= Opcode.map.OP_16)));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Will return a string formatted for the console
|
||||||
|
*
|
||||||
|
* @returns {String} Script opcode
|
||||||
|
*/
|
||||||
|
Opcode.prototype.inspect = function() {
|
||||||
|
return '<Opcode: ' + this.toString() + ', hex: '+this.toHex()+', decimal: '+this.num+'>';
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = Opcode;
|
module.exports = Opcode;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user