| brand_has | R Documentation |
Checks if a given brand object has a specific nested element accessible via
the additional arguments provided as key paths.
brand_has(brand, ...)
brand |
A brand object created by |
... |
One or more character strings or symbols representing the path to the nested element. |
TRUE if the nested element exists in the brand object,
FALSE otherwise.
Other brand.yml helpers:
brand_color_pluck(),
brand_pluck(),
with_brand_yml_path()
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
# Check if brand has a secondary color
brand_has(brand, "color", "secondary") # FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.