Tests
Test: custom-glue
Template
{{ items | join('|') }}
Data
{
"items": [1, 2, 3]
}
Output Django (error) v1.10.1
join requires 2 arguments, 1 provided
Output Jinja2 v2.8.0
1|2|3
Output Liquid v3.0.6
1 2 3
Output Nunjucks v2.5.0
1|2|3
Output Swig v1.4.2
1|2|3
Output Twig v1.24.2
1|2|3
Output Twigjs v0.9.5
1|2|3
Test: default
Template
{{ items | join }}
Data
{
"items": [1, 2, 3]
}
Output Django (error) v1.10.1
join requires 2 arguments, 1 provided
Output Jinja2 v2.8.0
123
Output Liquid v3.0.6
1 2 3
Output Nunjucks v2.5.0
123
Output Swig v1.4.2
1,2,3
Output Twig v1.24.2
123
Output Twigjs v0.9.5
123
Test: object
Template
{{ items | join(', ', 'name') }}
Data
{
"items": [
{ "name": "alpha" },
{ "name": "bravo" },
{ "name": "charlie" }
]
}
Output Django (error) v1.10.1
join requires 2 arguments, 1 provided
Output Jinja2 v2.8.0
alpha, bravo, charlie
Output Liquid v3.0.6
{"name"=>"alpha"}, {"name"=>"bravo"}, {"name"=>"charlie"}
Output Nunjucks v2.5.0
alpha, bravo, charlie
Output Swig v1.4.2
[object Object], [object Object], [object Object]
Output Twig v1.24.2
Array, Array, Array
Output Twigjs v0.9.5
[object Object], [object Object], [object Object]