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/content/docs/templates/hcl_templates/functions/collection/compact.mdx

21 lines
398 B

---
page_title: compact function reference
description: The `compact` function removes empty string elements from a list. Learn how to use the `compact` function in Packer templates.
---
# `compact` Function
`compact` takes a list of strings and returns a new list with any empty string
elements removed.
## Examples
```shell-session
> compact(["a", "", "b", "c"])
[
"a",
"b",
"c",
]
```