R/utils.R

Defines functions recursiveModify

recursiveModify <- function(x, modify = identity, when = function(x) TRUE) {
  purrr::modify_tree(
    x,
    pre = function(el) {
      if (!is.null(el) && when(el)) {
        return(modify(el))
      }
      el
    },
    is_node = is.list
  )
}
Appsilon/shiny.fluent documentation built on April 20, 2024, 1:03 p.m.