MCPcopy Index your code
hub / github.com/browserless/browserless / redactSensitiveBodyFields

Function redactSensitiveBodyFields

src/utils.ts:328–340  ·  view source on GitHub ↗
(body: unknown)

Source from the content-addressed store, hash-verified

326 * `[redacted]` marker.
327 */
328export const redactSensitiveBodyFields = (body: unknown): unknown => {
329 if (body === null || typeof body !== 'object' || Array.isArray(body)) {
330 return body;
331 }
332 return Object.fromEntries(
333 Object.entries(body).map(([key, value]) => [
334 key,
335 sensitiveBodyFields.includes(key) && value !== undefined
336 ? '[redacted]'
337 : value,
338 ]),
339 );
340};
341
342export const removeNullStringify = (
343 json: unknown,

Callers 4

handlerMethod · 0.85
handlerMethod · 0.85
handlerMethod · 0.85
handlerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected