Add support for the exists tag.

This commit is contained in:
Tom Alexander
2020-05-06 19:10:09 -04:00
parent 35f1ba8447
commit 0f47000a9b
14 changed files with 32 additions and 3 deletions

View File

@@ -0,0 +1 @@
Exists appears to follow the same truthiness rules that sections follow, rather than merely checking if a value exists.

View File

@@ -0,0 +1 @@
{"things": ["Alice", "Bob", "Chris"]}

View File

@@ -0,0 +1 @@
{"things": {}}

View File

@@ -0,0 +1 @@
["cat", "dog"]

View File

@@ -0,0 +1 @@
{"things": {"name": "Alice", "keyboard": "K-Type"}}

View File

@@ -0,0 +1 @@
{"there_are_no_things": 4}

View File

@@ -0,0 +1 @@
{"things": "just a string"}

View File

@@ -0,0 +1 @@
{"things": false}

View File

@@ -0,0 +1 @@
{"things": null}

View File

@@ -0,0 +1 @@
{"things": 0}

View File

@@ -0,0 +1 @@
{"things": ""}

View File

@@ -0,0 +1 @@
{"things": []}

View File

@@ -0,0 +1,5 @@
{?things}
Thing: {things}
{:else}
No things {.}
{/things}