Skip to content

Latest commit

 

History

History
94 lines (55 loc) · 1.25 KB

File metadata and controls

94 lines (55 loc) · 1.25 KB

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>