aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/obscuren/otto/type_boolean.go
diff options
context:
space:
mode:
Diffstat (limited to 'Godeps/_workspace/src/github.com/obscuren/otto/type_boolean.go')
-rw-r--r--Godeps/_workspace/src/github.com/obscuren/otto/type_boolean.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/obscuren/otto/type_boolean.go b/Godeps/_workspace/src/github.com/obscuren/otto/type_boolean.go
new file mode 100644
index 000000000..c24409de1
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/obscuren/otto/type_boolean.go
@@ -0,0 +1,13 @@
+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)
+}