projects
/
yaffs-website
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Yaffs site version 1.1
[yaffs-website]
/
vendor
/
twig
/
twig
/
doc
/
functions
/
min.rst
1
``min``
2
=======
3
4
.. versionadded:: 1.15
5
The ``min`` function was added in Twig 1.15.
6
7
``min`` returns the lowest value of a sequence or a set of values:
8
9
.. code-block:: jinja
10
11
{{ min(1, 3, 2) }}
12
{{ min([1, 3, 2]) }}
13
14
When called with a mapping, min ignores keys and only compares values:
15
16
.. code-block:: jinja
17
18
{{ min({2: "e", 3: "a", 1: "b", 5: "d", 4: "c"}) }}
19
{# returns "a" #}
20