Consider adding `is.shiny.tag()` function

Open
#389 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
web-dev

Research direction

Start by reviewing htmltools' existing utility functions and their tests to find the appropriate location and export pattern for this helper. Add coverage for shiny-tag and non-shiny-tag objects, and confirm the helper is available through the package's public API.

Written by the indexing model from the issue text.

Description

It's fairly common for me, I'm not sure about others, to want to know whether or not a particular object is a shiny tag. This is usually done as error checking arguments in a function.

I often add the following function to my utils file:

is.shiny.tag <- function(x) {
  inherits(x, "shiny.tag")
}

Would you accept a PR to add this to {htmltools}, or would you prefer not?

Dominant language
R
Stars
225
Forks
73
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rstudio/htmltools

All issues in rstudio/htmltools

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.