diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-19 23:01:40 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-19 23:01:40 +0800 |
commit | 92eaa98e8381bef5224ffe864aa1cd4288af4d12 (patch) | |
tree | f8b488887a750d7ca6cd23278ae9cc2e737b7ddd /ethereum/js_lib.go | |
parent | 017bbbb582b09a3264b4ff996f35275d381f284f (diff) | |
download | dexon-92eaa98e8381bef5224ffe864aa1cd4288af4d12.tar dexon-92eaa98e8381bef5224ffe864aa1cd4288af4d12.tar.gz dexon-92eaa98e8381bef5224ffe864aa1cd4288af4d12.tar.bz2 dexon-92eaa98e8381bef5224ffe864aa1cd4288af4d12.tar.lz dexon-92eaa98e8381bef5224ffe864aa1cd4288af4d12.tar.xz dexon-92eaa98e8381bef5224ffe864aa1cd4288af4d12.tar.zst dexon-92eaa98e8381bef5224ffe864aa1cd4288af4d12.zip |
Added js interpret mode
Diffstat (limited to 'ethereum/js_lib.go')
-rw-r--r-- | ethereum/js_lib.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ethereum/js_lib.go b/ethereum/js_lib.go index 8b59d75ca..189dcc3a0 100644 --- a/ethereum/js_lib.go +++ b/ethereum/js_lib.go @@ -31,6 +31,8 @@ function pp(object) { str += "\033[1m\033[30m" + object; } else if(typeof(object) === "number") { str += "\033[31m" + object; + } else if(typeof(object) === "function") { + str += "\033[35m[Function]"; } else { str += object; } @@ -40,7 +42,12 @@ function pp(object) { return str; } -function prettyPrint(object) { - console.log(pp(object)) +function prettyPrint(/* */) { + var args = arguments; + for(var i = 0, l = args.length; i < l; i++) { + console.log(pp(args[i])) + } } + +var print = prettyPrint; ` |