( payload: RedactablePayload, options: RedactLargeValueRefsOptions )
| 48 | * actual refs incur async hydrate → mask → re-store work. |
| 49 | */ |
| 50 | export async function redactLargeValueRefs( |
| 51 | payload: RedactablePayload, |
| 52 | options: RedactLargeValueRefsOptions |
| 53 | ): Promise<RedactablePayload> { |
| 54 | const result: RedactablePayload = { ...payload } |
| 55 | for (const key of Object.keys(payload) as (keyof RedactablePayload)[]) { |
| 56 | if (payload[key] !== undefined) { |
| 57 | result[key] = await redactValueRefs(payload[key], options) |
| 58 | } |
| 59 | } |
| 60 | return result |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * Hydrate, mask, and re-store offloaded large values inside an arbitrary value |
no test coverage detected