Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jan 15, 2024
1 parent 5677c4f commit d119271
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 41 deletions.
39 changes: 2 additions & 37 deletions base/none/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,41 +58,6 @@ function internal( x ) {
return true;
}

/**
* Tests whether all elements in a complex number array are falsy.
*
* @private
* @param {Collection} x - underlying data buffer
* @returns {boolean} boolean indicating whether all elements are falsy
*
* @example
* var x = [ 0, 0, 0, 0 ];
*
* var out = internalComplex( x );
* // returns true
*
* @example
* var x = [ 1, 2, 0, 4 ];
*
* var out = internalComplex( x );
* // returns false
*
* @example
* var x = [ 1, 2, 0, 0 ];
*
* var out = internalComplex( x );
* // returns false
*/
function internalComplex( x ) {
var i;
for ( i = 0; i < x.length; i += 2 ) {
if ( x[ i ] || x[ i+1 ] ) {
return false;
}
}
return true;
}

/**
* Tests whether all elements in an array are falsy.
*
Expand Down Expand Up @@ -160,10 +125,10 @@ function none( x ) {
if ( obj.accessorProtocol ) {
// 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 falsy if both components are zero...
if ( isComplex128Array( x ) ) {
return internalComplex( reinterpret128( x, 0 ) );
return internal( reinterpret128( x, 0 ) );
}
if ( isComplex64Array( x ) ) {
return internalComplex( reinterpret64( x, 0 ) );
return internal( reinterpret64( x, 0 ) );
}
return accessors( obj );
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit d119271

Please sign in to comment.