time-to-botec/squiggle/node_modules/@stdlib/assert/has-node-buffer-support/README.md
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

1.9 KiB

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>