function isScalarMostlySafeCompatible( value, dtype ) { // eslint-disable-line id-length
	if ( dtype === 'generic' ) {
		return validateGeneric( value, dtype );
	}
	if ( dtype === 'binary' ) {
		return validateBinary( value, dtype );
	}
	if ( isRealFloatingDataType( dtype ) ) {
		return validateRealFloating( value, dtype );
	}
	if ( isUnsignedIntegerDataType( dtype ) ) {
		return validateUnsignedInteger( value, dtype );
	}
	if ( isSignedIntegerDataType( dtype ) ) {
		return validateSignedInteger( value, dtype );
	}
	if ( isBooleanDataType( dtype ) ) {
		return validateBoolean( value, dtype );
	}
	if ( isComplexDataType( dtype ) ) {
		return validateComplexFloating( value, dtype );
	}
	throw new TypeError( format( 'invalid argument. Second argument must be a supported data type. Value: `%s`.', dtype ) );
}
Returns a boolean indicating whether a scalar value can be safely cast or, for floating-point data types, downcast to specified ndarray data type.

@param {*} value - scalar value
@param {string} dtype - ndarray data type
@throws {TypeError} second argument must be a supported data type
@returns {boolean} boolean indicating whether a scalar value can be safely cast

@example
var bool = isScalarMostlySafeCompatible( 3.0, 'float64' );
// returns true

@example
var bool = isScalarMostlySafeCompatible( 3.14, 'int32' );
// returns false

@example
var bool = isScalarMostlySafeCompatible( -1, 'uint32' );
// returns false