Node.js Buffer Support

Detect native Buffer support.

Usage

var hasNodeBufferSupport = require( '@stdlib/assert/has-node-buffer-support' );

hasNodeBufferSupport()

Detects if a runtime environment supports Buffer.

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

Examples

var hasNodeBufferSupport = require( '@stdlib/assert/has-node-buffer-support' );

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

CLI

Usage

Usage: has-node-buffer-support [options]

Options:

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

Examples

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