Skip to contents

Register a detector

Usage

register_detector(detector, overwrite = FALSE)

Arguments

detector

A detector created with new_detector().

overwrite

Replace an existing detector with the same id.

Value

The detector id, invisibly.

Examples

register_detector(new_detector(
  id = "employee_id", class = "internal", label = "Employee ID",
  pattern = bounded("EMP[0-9]{6}")
))
detect_pii("Approved by EMP123456")$type
#> [1] "employee_id"