You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/array/base/any/lib/main.js
+2-37Lines changed: 2 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -58,41 +58,6 @@ function internal( x ) {
58
58
returnfalse;
59
59
}
60
60
61
-
/**
62
-
* Tests whether at least one element in a complex number array is truthy.
63
-
*
64
-
* @private
65
-
* @param {Collection} x - underlying data buffer
66
-
* @returns {boolean} boolean indicating whether at least one element is truthy
67
-
*
68
-
* @example
69
-
* var x = [ 0, 0, 1, 0 ];
70
-
*
71
-
* var out = internalComplex( x );
72
-
* // returns true
73
-
*
74
-
* @example
75
-
* var x = [ 1, 2, 0, 0 ];
76
-
*
77
-
* var out = internalComplex( x );
78
-
* // returns true
79
-
*
80
-
* @example
81
-
* var x = [ 0, 0, 0, 0 ];
82
-
*
83
-
* var out = internalComplex( x );
84
-
* // returns false
85
-
*/
86
-
functioninternalComplex(x){
87
-
vari;
88
-
for(i=0;i<x.length;i+=2){
89
-
if(x[i]||x[i+1]){
90
-
returntrue;
91
-
}
92
-
}
93
-
returnfalse;
94
-
}
95
-
96
61
/**
97
62
* Tests whether at least one element in an array is truthy.
98
63
*
@@ -160,10 +125,10 @@ function any( x ) {
160
125
if(obj.accessorProtocol){
161
126
// If provided a complex number array, reinterpret as a real typed array and test interleaved real and imaginary components, where we consider a complex number to be truthy if at least one component is non-zero...
0 commit comments