hasBtoaSupport

Detect native btoa support.

Usage

var hasBtoaSupport = require( '@stdlib/assert/has-btoa-support' );

hasBtoaSupport()

Detects if a runtime environment supports btoa.

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

Examples

var hasBtoaSupport = require( '@stdlib/assert/has-btoa-support' );

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

CLI

Usage

Usage: has-btoa-support [options]

Options:

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

Examples

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