From 4bae3cb397428bbf54ac362b1cb8b563662c4836 Mon Sep 17 00:00:00 2001 From: Greg Dennis Date: Tue, 8 Feb 2022 14:21:39 +1300 Subject: [PATCH] added objects to truthiness table --- truthy.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/truthy.md b/truthy.md index a61b723..cf85c55 100755 --- a/truthy.md +++ b/truthy.md @@ -17,6 +17,8 @@ Here's a quick list, backed up by the shared unit tests, of what values should b `1`, `-1`, etc | any non-zero number | `true` `[]` | empty array | `false` `[1,2]` | any non-empty array | `true` + `{}` | empty object | `false` + `{"foo": "bar"}` | any non-empty object | `true` `""` | empty string | `false` `"anything"` | any non-empty string | `true` `"0"` | string zero | `true`