R/utils.R

Defines functions `%||%` is_named names3

`%||%` <- function(a, b) if (is.null(a)) b else a

is_named <- function(x) {
  length(x) > 0 && !any(is.null(x)) && all(names(x) != '')
}

names3 <- function(x) {
  names(x) %||% ''
}
nteetor/limestone documentation built on May 24, 2019, 9:56 a.m.