Skip to content

Commit

Permalink
fix(base): fix typos and duplicate changes
Browse files Browse the repository at this point in the history
This commit fixes any typos and duplicate function
definition in test files

PR-URL: stdlib-js#2805
Ref: stdlib-js#649
---------
Signed-off-by: Mohammad Kaif <[email protected]>
  • Loading branch information
Kaif987 committed Aug 26, 2024
1 parent b16c3fb commit 53424ed
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ var isPositive = ( v: number ): boolean => {
const x = [ 1, 1, 0, 0, 0 ];
const y = [ false, null, false, null, false, null, false, null, false, null ];

cueveryBy.assign( x, y, 0, '1', fcn ); // $ExpectError
cueveryBy.assign( x, y, 0, true, fcn ); // $ExpectError
cueveryBy.assign( x, y, 0, false, fcn ); // $ExpectError
cueveryBy.assign( x, y, 0, null, fcn ); // $ExpectError
cueveryBy.assign( x, y, 0, void 0, fcn ); // $ExpectError
cueveryBy.assign( x, y, 0, {}, fcn ); // $ExpectError
cueveryBy.assign( x, y, 0, [], fcn ); // $ExpectError
cueveryBy.assign( x, y, 0, '1', isPositive ); // $ExpectError
cueveryBy.assign( x, y, 0, true, isPositive ); // $ExpectError
cueveryBy.assign( x, y, 0, false, isPositive ); // $ExpectError
cueveryBy.assign( x, y, 0, null, isPositive ); // $ExpectError
cueveryBy.assign( x, y, 0, void 0, isPositive ); // $ExpectError
cueveryBy.assign( x, y, 0, {}, isPositive ); // $ExpectError
cueveryBy.assign( x, y, 0, [], isPositive ); // $ExpectError
}


Expand Down
6 changes: 3 additions & 3 deletions lib/node_modules/@stdlib/array/base/cuevery-by/lib/assign.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var arraylike2object = require( '@stdlib/array/base/arraylike2object' );
// FUNCTIONS //

/**
* Cumulatively tests whether very array element in a provided array passes a test implemented by a predicate function.
* Cumulatively tests whether every array element in a provided array passes a test implemented by a predicate function.
*
* @private
* @param {Collection} x - input array
Expand Down Expand Up @@ -71,7 +71,7 @@ function indexed( x, out, stride, offset, predicate, thisArg ) {
}

/**
* Cumulatively tests whether very array element in a provided array passes a test implemented by a predicate function.
* Cumulatively tests whether every array element in a provided array passes a test implemented by a predicate function.
*
* @private
* @param {Object} x - input array object
Expand Down Expand Up @@ -134,7 +134,7 @@ function accessors( x, out, stride, offset, predicate, thisArg ) {
// MAIN //

/**
* Cumulatively tests whether very array element in a provided array passes a test implemented by a predicate function.
* Cumulatively tests whether every array element in a provided array passes a test implemented by a predicate function.
*
* @param {Collection} x - input array
* @param {Collection} out - output array
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/array/base/cuevery-by/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var assign = require( './assign.js' );
// MAIN //

/**
* Cumulatively tests whether very array element in a provided array passes a test implemented by a predicate function.
* Cumulatively tests whether every array element in a provided array passes a test implemented by a predicate function.
*
* @param {Collection} x - input collection
* @param {Function} predicate - test function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ tape( 'the function cumulatively tests whether every array element in a provided
var actual;
var x;

function isPositive( v ) {
return ( v > 0 );
}

x = new Float64Array( [ 1.0, 1.0, 1.0, 0.0, 1.0 ] );
actual = cueveryBy( x, isPositive );
expected = [ true, true, true, false, false ];
Expand Down

0 comments on commit 53424ed

Please sign in to comment.