pkgload
pkgload copied to clipboard
FR: export `dev_packages()`
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()
}