Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

Const isTruthy

  • isTruthy(val: unknown): boolean
  • Checks if the given value is truthy.

    example

    isTruthy(true); // true isTruthy('a string'); // true isTruthy(1); // true isTruthy(0); // false isTruthy(null); // false isTruthy(undefined); // false isTruthy(false); // false isTruthy(NaN); // false

    Parameters

    • val: unknown

      The value to check.

    Returns boolean

    Whether the value is truthy.

Legend

  • Function

Generated using TypeDoc