File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
lib/node_modules/@stdlib/assert/has-bigint-support/lib Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 2020
2121// MODULES //
2222
23- var BigInt = require ( '@stdlib/bigint/ctor' ) ;
23+ var getGlobal = require ( '@stdlib/utils/global' ) ;
24+
25+
26+ // VARIABLES //
27+
28+ var Global = getGlobal ( ) ;
2429
2530
2631// MAIN //
@@ -35,7 +40,12 @@ var BigInt = require( '@stdlib/bigint/ctor' );
3540* // returns <boolean>
3641*/
3742function hasBigIntSupport ( ) {
38- return ( BigInt !== null ) ;
43+ return (
44+ typeof Global . BigInt === 'function' &&
45+ typeof BigInt === 'function' && // eslint-disable-line stdlib/require-globals, stdlib/no-builtin-big-int
46+ typeof Global . BigInt ( '1' ) === 'bigint' &&
47+ typeof BigInt ( '1' ) === 'bigint' // eslint-disable-line stdlib/require-globals, no-undef, stdlib/no-builtin-big-int
48+ ) ;
3949}
4050
4151
You can’t perform that action at this time.
0 commit comments