summaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lobject.js')
-rw-r--r--src/lobject.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lobject.js b/src/lobject.js
index 7b39668..385ac9c 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -102,6 +102,10 @@ class TValue {
return this.checktag(CT.LUA_TDEADKEY);
}
+ l_isfalse() {
+ return this.ttisnil() || (this.ttisboolean() && this.value === false);
+ }
+
}
const nil = new TValue(CT.LUA_TNIL, null);