Skip to content

Latest commit

 

History

History
95 lines (55 loc) · 1.23 KB

File metadata and controls

95 lines (55 loc) · 1.23 KB

Class Support

Detect native class support.

Usage

var hasClassSupport = require( '@stdlib/utils/detect-class-support' );

hasClassSupport()

Detects if a runtime environment supports ES2015 class.

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

Examples

var hasClassSupport = require( '@stdlib/utils/detect-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: hasclass [options]

Options:

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

Examples

$ hasclass
<boolean>