WeakSet Support

Detect native WeakSet support.

Usage

var hasWeakSetSupport = require( '@stdlib/utils/detect-weakset-support' );

hasWeakSetSupport()

Detects if a runtime environment supports ES2015 WeakSet.

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

Examples

var hasWeakSetSupport = require( '@stdlib/utils/detect-weakset-support' );

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

CLI

Usage

Usage: hasweakset [options]

Options:

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

Examples

$ hasweakset
<boolean>