Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "is-falsy"

Index

Functions

Functions

isFalsy

  • isFalsy(value: any): boolean
  • #### Returns whether the entered value is falsy


    Example usage:

    import { isFalsy } from "@thalesrc/js-utils";
    
    isFalsy(undefined); // true
    isFalsy(true); // false
    isFalsy([]) // false
    
    const falsyValues = ["a", undefined, "b", "", "c"].filter(isFalsy); // [undefined, ""]

    Static usage example:

    import "@thalesrc/js-utils/dist/as-static/is-falsy";
    
    Boolean.isFalsy(undefined); // true
    Boolean.isFalsy(true); // false
    Boolean.isFalsy([]) // false
    
    const falsyValues = ["a", undefined, "b", "", "c"].filter(Boolean.isFalsy); // [undefined, ""]

    Parameters

    • value: any

      value to be checked

    Returns boolean

Generated using TypeDoc