Skip to contents

This function returns TRUE for highlighted vectors (class vlightr_highlight) or subclasses thereof, and returns returns FALSE otherwise.

Usage

is_highlight(x)

Arguments

x

An object to test.

Value

TRUE if x is a vlightr_highlight, FALSE otherwise.

Examples

# The following are `FALSE`
is_highlight(10)
#> [1] FALSE

# The following are `TRUE`
is_highlight(highlight(10))
#> [1] TRUE
is_highlight(templight(10))
#> [1] TRUE
is_highlight(highlight_case(10))
#> [1] TRUE