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) 168 B
/** * @description * Use this helper to safeguard against falsey values. */ export declare const safeguard: <T>(x: T | false | undefined | null | "" | 0) => x is T;