MCPcopy
hub / github.com/browserless/browserless / safeParse

Function safeParse

src/utils.ts:305–311  ·  view source on GitHub ↗
(maybeJson: string)

Source from the content-addressed store, hash-verified

303};
304
305export const safeParse = (maybeJson: string): unknown | null => {
306 try {
307 return JSON.parse(maybeJson);
308 } catch {
309 return null;
310 }
311};
312
313const sensitiveBodyFields = [
314 'authenticate',

Callers 4

startMethod · 0.85
shimLegacyRequestsFunction · 0.85
jsonOrStringFunction · 0.85
readBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected