# WeakMap Support > Detect native [`WeakMap`][mdn-weakmap] support.
## Usage ```javascript var hasWeakMapSupport = require( '@stdlib/assert/has-weakmap-support' ); ``` #### hasWeakMapSupport() Detects if a runtime environment supports ES2015 [`WeakMap`][mdn-weakmap]. ```javascript var bool = hasWeakMapSupport(); // returns ```
## Examples ```javascript 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 ```text Usage: has-weakmap-support [options] Options: -h, --help Print this message. -V, --version Print the package version. ```
### Examples ```bash $ has-weakmap-support ```