mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-07 02:02:18 +00:00
da20785685
Former-commit-id: 23f542f43b4b493e38f5aa4c29788ed93a63b43b [formerly 71b23a6a28eb045fcfeab6329de69f1e5455486b] Former-commit-id: d12b3a6decc876f010a71f98e11df7387c1aaf2a
52 lines
993 B
Go
52 lines
993 B
Go
package otto
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
func formatForConsole(argumentList []Value) string {
|
|
output := []string{}
|
|
for _, argument := range argumentList {
|
|
output = append(output, fmt.Sprintf("%v", argument))
|
|
}
|
|
return strings.Join(output, " ")
|
|
}
|
|
|
|
func builtinConsole_log(call FunctionCall) Value {
|
|
fmt.Fprintln(os.Stdout, formatForConsole(call.ArgumentList))
|
|
return Value{}
|
|
}
|
|
|
|
func builtinConsole_error(call FunctionCall) Value {
|
|
fmt.Fprintln(os.Stdout, formatForConsole(call.ArgumentList))
|
|
return Value{}
|
|
}
|
|
|
|
// Nothing happens.
|
|
func builtinConsole_dir(call FunctionCall) Value {
|
|
return Value{}
|
|
}
|
|
|
|
func builtinConsole_time(call FunctionCall) Value {
|
|
return Value{}
|
|
}
|
|
|
|
func builtinConsole_timeEnd(call FunctionCall) Value {
|
|
return Value{}
|
|
}
|
|
|
|
func builtinConsole_trace(call FunctionCall) Value {
|
|
return Value{}
|
|
}
|
|
|
|
func builtinConsole_assert(call FunctionCall) Value {
|
|
return Value{}
|
|
}
|
|
|
|
func (runtime *_runtime) newConsole() *_object {
|
|
|
|
return newConsoleObject(runtime)
|
|
}
|