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