Skip to content

Commit

Permalink
feat: added array/base/count-same-value-zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
AgPriyanshu18 committed Feb 26, 2024
1 parent ed4fa13 commit 10d95dd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,13 @@ function complex( x, value ) {
* @returns {NonNegativeInteger} number of elements that are equal to the given value
*
* @example
*
* var countSameValueZero = require( '@stdlib/array/base/is-same-value-zero' );
*
* var x = [ 0, 0, 1, 0, 1 ];
*
* var n = countSameValueZero( x, 1 );
* // throws <ReferenceError>
* // return 2
*/
function countSameValueZero( x, value ) {
if ( isAccessorArray( x, value ) ) {
Expand Down

0 comments on commit 10d95dd

Please sign in to comment.