UNPKG

@future-widget-lab/safe-ops

Version:

A set of helper functions for performing operations safely, preventing runtime errors from disrupting your application.

6 lines (5 loc) 195 B
/** * @description * Use this helper to safely parse a possibly faulty JSON object. */ export declare const safeJsonParse: <TData>(input: string | null | undefined, fallback: TData) => TData;