Uint8Array Support

Detect native Uint8Array support.

Usage

var hasUint8ArraySupport = require( '@stdlib/utils/detect-uint8array-support' );

hasUint8ArraySupport()

Detects if a runtime environment supports Uint8Array.

var bool = hasUint8ArraySupport();
// returns <boolean>

Examples

var hasUint8ArraySupport = require( '@stdlib/utils/detect-uint8array-support' );

var bool = hasUint8ArraySupport();
if ( bool ) {
    console.log( 'Environment has Uint8Array support.' );
} else {
    console.log( 'Environment lacks Uint8Array support.' );
}

CLI

Usage

Usage: hasuint8arrays [options]

Options:

  -h,    --help                Print this message.
  -V,    --version             Print the package version.

Examples

$ hasuint8arrays
<boolean>