Checks if a given brand
object has a specific nested element accessible via
the additional arguments provided as key paths.
Arguments
- brand
A brand object created by
read_brand_yml()
oras_brand_yml()
.- ...
One or more character strings or symbols representing the path to the nested element to check.
See also
Other brand.yml helpers:
brand_color_pluck()
,
brand_pluck()
Examples
brand <- as_brand_yml(list(
meta = list(name = "Example Brand"),
color = list(primary = "#FF5733")
))
# Check if brand has a primary color
brand_has(brand, "color", "primary") # TRUE
#> [1] TRUE
# Check if brand has a secondary color
brand_has(brand, "color", "secondary") # FALSE
#> [1] FALSE