Skip to content

Commit c080fc3

Browse files
committed
feat: added array/base/count-same-value-zero.
1 parent d69eb54 commit c080fc3

File tree

1 file changed

+4
-1
lines changed
  • lib/node_modules/@stdlib/array/base/count-same-value-zero/lib

1 file changed

+4
-1
lines changed

lib/node_modules/@stdlib/array/base/count-same-value-zero/lib/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,13 @@ function complex( x, value ) {
144144
* @returns {NonNegativeInteger} number of elements that are equal to the given value
145145
*
146146
* @example
147+
*
148+
* var countSameValueZero = require( '@stdlib/array/base/is-same-value-zero' );
149+
*
147150
* var x = [ 0, 0, 1, 0, 1 ];
148151
*
149152
* var n = countSameValueZero( x, 1 );
150-
* // throws <ReferenceError>
153+
* // return 2
151154
*/
152155
function countSameValueZero( x, value ) {
153156
if ( isAccessorArray( x, value ) ) {

0 commit comments

Comments
 (0)