isCastingMode
Test if an input value is a supported ndarray casting mode.
Usage
var isCastingMode = require( '@stdlib/ndarray/base/assert/is-casting-mode' );
isCastingMode( value )
Tests if an input value
is a supported ndarray casting mode.
var bool = isCastingMode( 'safe' );
// returns true
Examples
var isCastingMode = require( '@stdlib/ndarray/base/assert/is-casting-mode' );
var bool = isCastingMode( 'none' );
// returns true
bool = isCastingMode( 'equiv' );
// returns true
bool = isCastingMode( 'safe' );
// returns true
bool = isCastingMode( 'mostly-safe' );
// returns true
bool = isCastingMode( 'same-kind' );
// returns true
bool = isCastingMode( 'unsafe' );
// returns true
bool = isCastingMode( '' );
// returns false
bool = isCastingMode( 'foo' );
// returns false