Awee

default

Default returns the fallback value if the input is nil or an empty string.

Default returns the fallback value if the input is nil or an empty string.

Input

any

Parameters

#TypeRequired
0anyyes

Returns

any

Examples

{{ name | default:'anonymous' }}
{{ count | default:0 }}
{{ items | find:'id',99 | default:{} }}
{{ items | find:'slug','my-item' | default:{} }}

How is this guide?

On this page