Symbol Support

Detect native Symbol support.

Usage

var hasSymbolSupport = require( '@stdlib/utils/detect-symbol-support' );

hasSymbolSupport()

Detects if a runtime environment supports ES2015 Symbol.

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

Examples

var hasSymbolSupport = require( '@stdlib/utils/detect-symbol-support' );

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

CLI

Usage

Usage: hassymbols [options]

Options:

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

Examples

$ hassymbols
<boolean>