Symbol.toStringTag Support

Detect native Symbol.toStringTag support.

Usage

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

hasToStringTagSupport()

Detects if a runtime environment supports ES2015 Symbol.toStringTag.

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

Examples

var hasToStringTagSupport = require( '@stdlib/utils/detect-tostringtag-support' );

var bool = hasToStringTagSupport();
if ( bool ) {
    console.log( 'Environment has `toStringTag` support.' );
} else {
    console.log( 'Environment lacks `toStringTag` support.' );
}

CLI

Usage

Usage: hastostringtag [options]

Options:

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

Examples

$ hastostringtag
<boolean>