aboutsummaryrefslogtreecommitdiffstats
path: root/jsre/pretty.go
diff options
context:
space:
mode:
Diffstat (limited to 'jsre/pretty.go')
-rw-r--r--jsre/pretty.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/jsre/pretty.go b/jsre/pretty.go
index cf04deec6..7300a5f37 100644
--- a/jsre/pretty.go
+++ b/jsre/pretty.go
@@ -54,6 +54,14 @@ func prettyPrint(vm *otto.Otto, value otto.Value) {
ppctx{vm}.printValue(value, 0)
}
+func prettyPrintJS(call otto.FunctionCall) otto.Value {
+ for _, v := range call.ArgumentList {
+ prettyPrint(call.Otto, v)
+ fmt.Println()
+ }
+ return otto.UndefinedValue()
+}
+
type ppctx struct{ vm *otto.Otto }
func (ctx ppctx) indent(level int) string {