Open Policy Agent TypeScript Packages
    Preparing search index...
    • Apply masking rules to an object (i.e. "mask" it)

      Type Parameters

      • T extends Record<string, any>

      Parameters

      • maskRules: Record<string, Record<string, MaskRule> | MaskRule>

        Masking rules as returned from the Compile API.

      • targetObject: T

        Object to apply replacements to

      • OptionaltargetType: string

        Type of the object to apply replacements to (prefix of maskRules).

      Returns T

      A new object with values replaced according to the rules