You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/website/source/docs/configuration/from-1.5/functions/collection/coalesce.html.md

785 B

layout page_title sidebar_current description
docs coalesce - Functions - Configuration Language configuration-functions-collection-coalesce-x The coalesce function takes any number of arguments and returns the first one that isn't null nor empty.

coalesce Function

coalesce takes any number of arguments and returns the first one that isn't null or an empty string.

Examples

> coalesce("a", "b")
a
> coalesce("", "b")
b
> coalesce(1,2)
1

To perform the coalesce operation with a list of strings, use the ... symbol to expand the list as arguments:

> coalesce(["", "b"]...)
b
  • coalescelist performs a similar operation with list arguments rather than individual arguments.