Open Policy Agent TypeScript Packages
    Preparing search index...
    • Filter an object by key prefix, removing the prefix from the keys.

      Parameters

      • obj: Record<string, MaskRule>

        The object to filter, e.g. {"users.id": {...}, "groups.name": {...}}

      • type: string

        The prefix to filter by (e.g. "users")

      Returns Record<string, MaskRule>

      A new object with only keys that had the specified prefix, with the prefix removed