Skip to content

Conformance Examples 0.1.0 — Transforms: transform-downcase

downcase-string

A string literal downcased via the built-in downcase transform.

Template

{{ "HI" | downcase }}

Context

{}

Output

hi

downcase-identifier-string

An identifier pointing to a string value is downcased.

Template

{{ foo | downcase }}

Context

{
    "foo": "HELLO"
}

Output

hello

downcase-null-context

A missing key (resolves to null) coerces to "null" then downcases to "null" (already lowercase).

Template

{{ missing | downcase }}

Context

{}

Output

null

downcase-json-null

An explicit JSON null value coerces to "null" then downcases to "null".

Template

{{ foo | downcase }}

Context

{
    "foo": null
}

Output

null

downcase-number

A number coerces to its string form; downcasing has no effect on digits.

Template

{{ n | downcase }}

Context

{
    "n": 5
}

Output

5

downcase-boolean

A boolean true coerces to "true" then downcases to "true" (no-op, already lowercase).

Template

{{ b | downcase }}

Context

{
    "b": true
}

Output

true

downcase-chained-with-upcase

Two-transform chain: downcase then upcase. Final result is uppercase.

Template

{{ foo | downcase | upcase }}

Context

{
    "foo": "Hello"
}

Output

HELLO

downcase-on-binary-false

Downcase applied to the result of a false binary comparison. false renders as "false", downcased to "false".

Template

{{ a == b | downcase }}

Context

{
    "a": 1,
    "b": 2
}

Output

false

downcase-greek-capital

Unicode default case mapping downcases a Greek capital letter to its lowercase form.

Template

{{ s | downcase }}

Context

{
    "s": "Β"
}

Output

β

Source fixture: transforms/transform-downcase.json