Sitelet https://github.com/stdlib-js/assert/tree/main/has-arraybuffer-support
Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

ArrayBuffer Support

Detect native ArrayBuffer support.

Usage

var hasArrayBufferSupport = require( '@stdlib/assert/has-arraybuffer-support' );

hasArrayBufferSupport()

Detects if a runtime environment supports ArrayBuffer.

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

Examples

var hasArrayBufferSupport = require( '@stdlib/assert/has-arraybuffer-support' );

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

CLI

Usage

Usage: has-arraybuffer-support [options]

Options:

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

Examples

$ has-arraybuffer-support
<boolean>

See Also