Function: resolvePolicy()
resolvePolicy(
policy):DeidPolicy
Resolve the policy argument accepted by the engine: the string "safe-harbor" (or undefined)
yields the built-in policy; a DeidPolicy object is returned as-is.
Parameters
policy
DeidPolicy | "safe-harbor" | undefined
"safe-harbor", a DeidPolicy, or undefined.
Returns
The concrete policy to apply.
Example
import { resolvePolicy, SAFE_HARBOR_POLICY } from "@cosyte/deid";
resolvePolicy("safe-harbor") === SAFE_HARBOR_POLICY; // => true