elf-notes/content/docs/zola/predicates.yaml

53 lines
1.6 KiB
YAML
Raw Normal View History

2022-05-13 19:18:44 +00:00
---
definitions:
-
dt: "defined"
dd: " the given variable is defined."
-
dt: "undefined"
dd: " the given variable is undefined."
-
dt: "odd"
dd: " the given variable is an odd number."
-
dt: "even"
dd: " the given variable is an even number."
-
dt: "string"
dd: " the given variable is a string."
-
dt: "number"
dd: " the given variable is a number."
-
dt: "divisibleby"
dd: " the given expression is divisible by the arg given."
-
dt: "iterable"
dd: " Returns true if the given variable can be iterated over in Tera (i.e. is an array/tuple or an object)."
-
dt: "object"
dd: " Returns true if the given variable is an object (i.e. can be iterated over key, value)."
-
dt: "starting_with(string)"
dd: " Returns true if the given variable is a string and starts with the arg given."
-
dt: "ending_with(string)"
dd: " Returns true if the given variable is a string and ends with the arg given."
-
dt: "containing(val)"
dd: " Returns true if the given variable contains the arg given."
definitions:
-
dt: "strings"
dd: " is the arg a substring?"
-
dt: "arrays"
dd: " is the arg one of the members of the array?"
-
dt: "maps"
dd: " is the arg a key of the map?"
-
dt: "matching(regexp)"
dd: " Returns true if the given variable is a string and matches the regex in the argument."