time-to-botec/squiggle/node_modules/@stdlib/assert/has-class-support/README.md
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

2.1 KiB

Class Support

Detect native class support.

Usage

var hasClassSupport = require( '@stdlib/assert/has-class-support' );

hasClassSupport()

Detects if a runtime environment supports ES2015 class.

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

Notes

  • The implementation uses code evaluation, which may be problematic in browser contexts enforcing a strict content security policy (CSP).

Examples

var hasClassSupport = require( '@stdlib/assert/has-class-support' );

var bool = hasClassSupport();
if ( bool ) {
    console.log( 'Environment has native class support.' );
} else {
    console.log( 'Environment lacks native class support.' );
}

CLI

Usage

Usage: has-class-support [options]

Options:

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

Examples

$ has-class-support
<boolean>