R/utils-export.R

Defines functions is_token is_project_slug

# check if a string follows the format of a project slug
#' @importFrom stringr str_count
is_project_slug <- function(x) {
  str_count(x, "/") == 1L & substr(x, 1, 1) != "/" & substr(x, nchar(x), nchar(x)) != "/"
}

# check if a string follows the format of an api token
is_token <- function(x) nchar(x) == 32L & grepl("[[:alnum:]]", x)

Try the biocompute package in your browser

Any scripts or data that you put into this service are public.

biocompute documentation built on May 3, 2022, 9:08 a.m.