Skip to content

Latest commit

 

History

History
117 lines (68 loc) · 2.51 KB

File metadata and controls

117 lines (68 loc) · 2.51 KB

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