Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "assert/is-primitive-array/docs/types/index.d"

Index

Functions

Functions

Export assignment isPrimitiveArray

  • isPrimitiveArray(value: any): boolean
  • Tests if a value is an array-like object containing only JavaScript primitives.

    Parameters

    • value: any

      value to test

    Returns boolean

    boolean indicating whether an input value is an array-like object containing only JavaScript primitives

    Example

    var bool = isPrimitiveArray( [ '3', 2, null ] );
    // returns true
    
    bool = isPrimitiveArray( [ {}, 2, 1 ] );
    // returns false
    
    bool = isPrimitiveArray( [ new String('abc'), '3.0' ] );
    // returns false