File tree 2 files changed +10
-2
lines changed
lib/node_modules/@stdlib/assert/is-int32array/lib
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 35
35
36
36
// MODULES //
37
37
38
- var isInt32Array = require ( './is_int32array .js' ) ;
38
+ var isInt32Array = require ( './main .js' ) ;
39
39
40
40
41
41
// EXPORTS //
Original file line number Diff line number Diff line change 23
23
var nativeClass = require ( '@stdlib/utils/native-class' ) ;
24
24
25
25
26
+ // VARIABLES //
27
+
28
+ var hasInt32Array = ( typeof Int32Array === 'function' ) ; // eslint-disable-line stdlib/require-globals
29
+
30
+
26
31
// MAIN //
27
32
28
33
/**
@@ -40,7 +45,10 @@ var nativeClass = require( '@stdlib/utils/native-class' );
40
45
* // returns false
41
46
*/
42
47
function isInt32Array ( value ) {
43
- return ( nativeClass ( value ) === '[object Int32Array]' ) ;
48
+ return (
49
+ ( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals
50
+ nativeClass ( value ) === '[object Int32Array]'
51
+ ) ;
44
52
}
45
53
46
54
You can’t perform that action at this time.
0 commit comments