Node.js Buffer Support

Detect native Buffer support.

Usage

var hasNodeBufferSupport = require( '@stdlib/utils/detect-node-buffer-support' );

hasNodeBufferSupport()

Detects if a runtime environment supports Buffer.

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

Examples

var hasNodeBufferSupport = require( '@stdlib/utils/detect-node-buffer-support' );

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

CLI

Usage

Usage: hasnodebuffers [options]

Options:

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

Examples

$ hasnodebuffers
<boolean>