Map Support

Detect native Map support.

Usage

var hasMapSupport = require( '@stdlib/utils/detect-map-support' );

hasMapSupport()

Detects if a runtime environment supports ES2015 Map.

var bool = hasMapSupport();
// returns <Boolean>

Examples

var hasMapSupport = require( '@stdlib/utils/detect-map-support' );

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

CLI

Usage

Usage: hasmap [options]

Options:

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

Examples

$ hasmap
<boolean>