pkgload icon indicating copy to clipboard operation
pkgload copied to clipboard

FR: export `dev_packages()`

Open olivroy opened this issue 9 months ago • 0 comments

I am trying to build a function to preview help (not necessarily dev) on the pkgdown site.

I need to know whether a certain package is loaded via devtools.

The only function I found was the internal dev_packages() in pkgload?

Any chance it could be exported?

otherwise, I can always use a wrapper around pkgload::is_dev_package(), but it is a bit uglier

dev_packages <- function() {
  loadedNamespaces() |> rlang::set_names() |> lapply(pkgload::is_dev_package) |> unlist() |>  which() |> names()
}

olivroy avatar May 14 '24 13:05 olivroy