Symbol.toStringTag Support

Detect native Symbol.toStringTag support.

Usage

var hasToStringTagSupport = require( '@stdlib/assert/has-tostringtag-support' );

hasToStringTagSupport()

Detects if a runtime environment supports ES2015 Symbol.toStringTag.

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

Examples

var hasToStringTagSupport = require( '@stdlib/assert/has-tostringtag-support' );

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

CLI

Usage

Usage: has-tostringtag-support [options]

Options:

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

Examples

$ has-tostringtag-support
<boolean>
Did you find this page helpful?