Skip to content

Commit

Permalink
refactor: use base assertion utility
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Jan 14, 2024
1 parent 4331e1f commit 87d2120
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions lib/node_modules/@stdlib/array/complex64/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var isComplexLike = require( '@stdlib/assert/is-complex-like' );
var isEven = require( '@stdlib/math/base/assert/is-even' );
var isInteger = require( '@stdlib/math/base/assert/is-integer' );
var isComplex64Array = require( '@stdlib/array/base/assert/is-complex64array' );
var isComplex128Array = require( '@stdlib/array/base/assert/is-complex128array' );
var hasIteratorSymbolSupport = require( '@stdlib/assert/has-iterator-symbol-support' );
var ITERATOR_SYMBOL = require( '@stdlib/symbol/iterator' );
var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
Expand Down Expand Up @@ -102,22 +103,6 @@ function isComplexArrayConstructor( value ) {
);
}

/**
* Returns a boolean indicating if a value is a `Complex128Array`.
*
* @private
* @param {*} value - value to test
* @returns {boolean} boolean indicating if a value is a `Complex128Array`
*/
function isComplex128Array( value ) { // TODO: move to array/base/assert/is-complex128-array
return (
typeof value === 'object' &&
value !== null &&
value.constructor.name === 'Complex128Array' &&
value.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT*2
);
}

/**
* Retrieves a complex number from a complex number array buffer.
*
Expand Down

1 comment on commit 87d2120

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report

Package Statements Branches Functions Lines
array/base/assert/is-complex128array $\color{green}100/100$
$\color{green}+100.00\%$
$\color{green}6/6$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}100/100$
$\color{green}+100.00\%$
array/base/assert $\color{green}78/78$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}78/78$
$\color{green}+100.00\%$
array/complex128 $\color{red}2520/2525$
$\color{green}+99.80\%$
$\color{red}430/435$
$\color{green}+98.85\%$
$\color{green}39/39$
$\color{green}+100.00\%$
$\color{red}2520/2525$
$\color{green}+99.80\%$
array/complex64 $\color{red}2724/2729$
$\color{green}+99.82\%$
$\color{red}456/461$
$\color{green}+98.92\%$
$\color{green}41/41$
$\color{green}+100.00\%$
$\color{red}2724/2729$
$\color{green}+99.82\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.