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 20
20
21
21
// MODULES //
22
22
23
- var BigInt = require ( '@stdlib/bigint/ctor' ) ;
23
+ var getGlobal = require ( '@stdlib/utils/global' ) ;
24
+
25
+
26
+ // VARIABLES //
27
+
28
+ var Global = getGlobal ( ) ;
24
29
25
30
26
31
// MAIN //
@@ -35,7 +40,12 @@ var BigInt = require( '@stdlib/bigint/ctor' );
35
40
* // returns <boolean>
36
41
*/
37
42
function 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
+ ) ;
39
49
}
40
50
41
51
You can’t perform that action at this time.
0 commit comments