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