WeakSet Support

Detect native WeakSet support.

Usage

var hasWeakSetSupport = require( '@stdlib/assert/has-weakset-support' );

hasWeakSetSupport()

Detects if a runtime environment supports ES2015 WeakSet.

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

Examples

var hasWeakSetSupport = require( '@stdlib/assert/has-weakset-support' );

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

CLI

Usage

Usage: has-weakset-support [options]

Options:

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

Examples

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