Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ndarray/base/assert/is-data-type/docs/types/index.d"

Index

Functions

Functions

Export assignment isDataType

  • isDataType(v: any): boolean
  • Tests whether an input value is a supported ndarray data type.

    Parameters

    • v: any

      value to test

    Returns boolean

    boolean indicating whether an input value is a supported ndarray data type

    Example

    var bool = isDataType( 'binary' );
    // returns true
    
    bool = isDataType( 'float32' );
    // returns true
    
    bool = isDataType( 'float64' );
    // returns true
    
    bool = isDataType( 'generic' );
    // returns true
    
    bool = isDataType( 'int16' );
    // returns true
    
    bool = isDataType( 'int32' );
    // returns true
    
    bool = isDataType( 'int8' );
    // returns true
    
    bool = isDataType( 'uint16' );
    // returns true
    
    bool = isDataType( 'uint32' );
    // returns true
    
    bool = isDataType( 'uint8' );
    // returns true
    
    bool = isDataType( 'uint8c' );
    // returns true
    
    bool = isDataType( 'foo' );
    // returns false