Skip to content

Latest commit

 

History

History
135 lines (80 loc) · 2.64 KB

File metadata and controls

135 lines (80 loc) · 2.64 KB

Symbol Support

Detect native Symbol support.

Usage

var hasSymbolSupport = require( '@stdlib/assert/has-symbol-support' );

hasSymbolSupport()

Detects if a runtime environment supports ES2015 Symbol.

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

Examples

var hasSymbolSupport = require( '@stdlib/assert/has-symbol-support' );

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

CLI

Usage

Usage: has-symbol-support [options]

Options:

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

Examples

$ has-symbol-support
<boolean>

See Also