Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: box id as character only #254

Closed
ijlyttle opened this issue Jan 1, 2024 · 1 comment
Closed

refactor: box id as character only #254

ijlyttle opened this issue Jan 1, 2024 · 1 comment

Comments

@ijlyttle
Copy link
Member

ijlyttle commented Jan 1, 2024

This is a followon from #80.

The only reason we are using the bit64 package is for this bit of code:

# Validate ids supplied
box_id <- function(x) {
  if (!is.null(x) && any(is.na(bit64::as.integer64(x)))) 
    stop("box.com API ids must be (coercible to) 64-bit integers")
  if (!is.null(x))
    return(as.character(bit64::as.integer64(x)))
}

I think we could drop {bit64} by replacing this validator using a regular-expression that checks for digits.

@ijlyttle
Copy link
Member Author

ijlyttle commented Feb 4, 2024

fixed in #264

@ijlyttle ijlyttle closed this as completed Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant