1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00
otto/type_boolean.go
Robert Krimen 4ebf6416d0 Fix Uint32 Array/String indexing
Also, a bunch of toValue_* streamlining
And maybe a few miscellaneous tweaks
2013-06-22 15:49:22 +02:00

14 lines
262 B
Go

package otto
import (
"strconv"
)
func (runtime *_runtime) newBooleanObject(value Value) *_object {
return runtime.newPrimitiveObject("Boolean", toValue_bool(toBoolean(value)))
}
func booleanToString(value bool) string {
return strconv.FormatBool(value)
}