WeakMap Support
Detect native
WeakMap
support.
Usage
var hasWeakMapSupport = require( '@stdlib/assert/has-weakmap-support' );
hasWeakMapSupport()
Detects if a runtime environment supports ES2015 WeakMap
.
var bool = hasWeakMapSupport();
// returns <boolean>
Examples
var hasWeakMapSupport = require( '@stdlib/assert/has-weakmap-support' );
var bool = hasWeakMapSupport();
if ( bool ) {
console.log( 'Environment has WeakMap support.' );
} else {
console.log( 'Environment lacks WeakMap support.' );
}
CLI
Usage
Usage: has-weakmap-support [options]
Options:
-h, --help Print this message.
-V, --version Print the package version.
Examples
$ has-weakmap-support
<boolean>