Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ndarray/base/assert/is-casting-mode/docs/types/index.d"

Index

Functions

Functions

Export assignment isCastingMode

  • isCastingMode(v: any): boolean
  • Tests whether an input value is a supported ndarray casting mode.

    Parameters

    • v: any

      value to test

    Returns boolean

    boolean indicating whether an input value is a supported ndarray casting mode

    Example

    var bool = isCastingMode( 'none' );
    // returns true
    
    bool = isCastingMode( 'equiv' );
    // returns true
    
    bool = isCastingMode( 'safe' );
    // returns true
    
    bool = isCastingMode( 'same-kind' );
    // returns true
    
    bool = isCastingMode( 'unsafe' );
    // returns true
    
    bool = isCastingMode( 'foo' );
    // returns false