Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/any/docs/types/index.d"

Index

Functions

Functions

Export assignment any

  • Tests whether at least one element in a collection is truthy.

    Notes

    • The function immediately returns upon encountering a truthy value.
    • If provided an empty collection, the function returns false.

    Parameters

    Returns boolean

    boolean indicating whether at least one element is truthy

    Example

    var arr = [ 0, 0, 0, 0, 1 ];
    
    var bool = any( arr );
    // returns true