time-to-botec/js/node_modules/@stdlib/assert/has-weakset-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

1.9 KiB

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>