Skip to content

Bars Specification 0.1.0 — Transform: contains

Category: string · Since: 0.1.0

Reports whether the input contains a value.

Returns true/false. For list input, matches any element whose string form equals value's string form; otherwise performs a substring match against the input coerced to a string.

Arguments

Name Type Optional Default
value string no

Arity: 1–1

Worked examples

{{ phrase | contains: "world" }}

true
{{ items | contains: "b" }}

true

Full fixture: transforms/transform-contains.json