diff --git a/R/standalone-lifecycle.R b/R/standalone-lifecycle.R index 70f03184a..e29b0ce69 100644 --- a/R/standalone-lifecycle.R +++ b/R/standalone-lifecycle.R @@ -14,6 +14,12 @@ # # ## Changelog # +# 2025-08-02 +# +# - Added `deprecated()` and `is_present()`, intended to use as +# deprecated arguments' default value. +# Same as `lifecycle::deprecated()` and `lifecycle::is_present()`. +# # 2024-09-27 # # - Depends on `standalone-cli.R` instead of the cli package. @@ -253,4 +259,10 @@ with_lifecycle_errors <- function(expr) { opt } +deprecated <- function() missing_arg() + +is_present <- function(arg) { + !is_missing(maybe_missing(arg)) +} + # nocov end diff --git a/R/utils.R b/R/utils.R index 49d46e284..6d85a8c3b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -1,5 +1,3 @@ -deprecated <- function() missing_arg() - abort_coercion <- function( x, to_type,