1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-19 19:55:30 +08:00
otto/builtin_boolean.go
2013-02-20 15:58:45 -08:00

12 lines
277 B
Go

package otto
// Boolean
func builtinBoolean(call FunctionCall) Value {
return toValue(toBoolean(call.Argument(0)))
}
func builtinNewBoolean(self *_object, _ Value, argumentList []Value) Value {
return toValue(self.runtime.newBoolean(valueOfArrayIndex(argumentList, 0)))
}