1
dots_n <- function(...) {
2 1
  nargs()
3
}
4

5
# Like `ellipsis::check_dots_empty()` but without the import
6
check_dots_empty <- function(fn, ...) {
7 1
  n <- dots_n(...)
8

9 1
  if (n == 0L) {
10 1
    return(invisible())
11
  }
12

13 1
  msg <- paste0(
14 1
    "`...` is not empty in `", fn, "()`.\n",
15 1
    "These dots only exist to allow for future extensions and should be empty.\n",
16 1
    "Did you misspecify an argument?"
17
  )
18

19 1
  stop(msg, call. = FALSE)
20
}

Read our documentation on viewing source code .

Loading