isByteOrder

Test if an input value is a supported array byte order.

Usage

var isByteOrder = require( '@stdlib/array/base/assert/is-byte-order' );

isByteOrder( value )

Tests if an input value is a supported array byte order.

var bool = isByteOrder( 'little-endian' );
// returns true

bool = isByteOrder( 'big-endian' );
// returns true

Examples

var isByteOrder = require( '@stdlib/array/base/assert/is-byte-order' );

var bool = isByteOrder( 'little-endian' );
// returns true

bool = isByteOrder( 'big-endian' );
// returns true

bool = isByteOrder( '' );
// returns false

bool = isByteOrder( 'foo' );
// returns false
Did you find this page helpful?