Uint8Array Support

Detect native Uint8Array support.

Usage

var hasUint8ArraySupport = require( '@stdlib/assert/has-uint8array-support' );

hasUint8ArraySupport()

Detects if a runtime environment supports Uint8Array.

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

Examples

var hasUint8ArraySupport = require( '@stdlib/assert/has-uint8array-support' );

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

CLI

Usage

Usage: has-uint8array-support [options]

Options:

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

Examples

$ has-uint8array-support
<boolean>
Did you find this page helpful?