@stdlib/assert-has-arraybuffer-support
v0.2.2
Published
Detect native ArrayBuffer support.
Downloads
10,435
Readme
ArrayBuffer Support
Detect native
ArrayBuffer
support.
Installation
npm install @stdlib/assert-has-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.' );
}
See Also
@stdlib/assert-has-arraybuffer-support-cli
: CLI package for use as a command-line utility.@stdlib/assert-has-float32array-support
: detect native Float32Array support.@stdlib/assert-has-float64array-support
: detect native Float64Array support.@stdlib/assert-has-int16array-support
: detect native Int16Array support.@stdlib/assert-has-int32array-support
: detect native Int32Array support.@stdlib/assert-has-int8array-support
: detect native Int8Array support.@stdlib/assert-has-node-buffer-support
: detect native Buffer support.@stdlib/assert-has-sharedarraybuffer-support
: detect native SharedArrayBuffer support.@stdlib/assert-has-uint16array-support
: detect native Uint16Array support.@stdlib/assert-has-uint32array-support
: detect native Uint32Array support.@stdlib/assert-has-uint8array-support
: detect native Uint8Array support.@stdlib/assert-has-uint8clampedarray-support
: detect native Uint8ClampedArray support.
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.