Skip to content

Commit caa2fa1

Browse files
committed
Auto-generated commit
1 parent b161c38 commit caa2fa1

File tree

23 files changed

+183
-130
lines changed

23 files changed

+183
-130
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<section class="release" id="unreleased">
66

7-
## Unreleased (2024-09-29)
7+
## Unreleased (2024-10-03)
88

99
<section class="packages">
1010

@@ -718,6 +718,8 @@ A total of 8 people contributed to this release. Thank you to the following cont
718718

719719
<details>
720720

721+
- [`ca2fbd0`](https://github.com/stdlib-js/stdlib/commit/ca2fbd0beec71a0f41307b19939b2c8dd27c76a9) - **chore:** minor clean-up _(by Philipp Burckhardt)_
722+
- [`89e005a`](https://github.com/stdlib-js/stdlib/commit/89e005ad5004d32271fe7266e95eb96187c1946a) - **chore:** minor clean-up _(by Philipp Burckhardt)_
721723
- [`2c4e5d8`](https://github.com/stdlib-js/stdlib/commit/2c4e5d824e0c5dc8fd536bf79ff565cee100ce46) - **build:** disable additional lint rule in TS tests _(by Philipp Burckhardt)_
722724
- [`aad48ea`](https://github.com/stdlib-js/stdlib/commit/aad48eab1f19217854f4ffbfaed2a8be664b0f47) - **chore:** resolve lint errors _(by Philipp Burckhardt)_
723725
- [`5a50038`](https://github.com/stdlib-js/stdlib/commit/5a50038db6a457856adc51d5e6e3fd7161f45085) - **feat:** add `array/base/cuevery-by-right` [(#2802)](https://github.com/stdlib-js/stdlib/pull/2802) _(by HarshaNP, Philipp Burckhardt)_

CONTRIBUTORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Contributors listed in alphabetical order.
44

5-
Aayush Khanna <[email protected].com>
5+
Aayush Khanna <aayushiitbhu23@gmail.com>
66
Adarsh Palaskar <[email protected]>
77
Aditya Sapra <[email protected]>
88
AgPriyanshu18 <[email protected]>

base/cuany-by-right/docs/repl.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
{{alias}}( x, predicate[, thisArg] )
23
Cumulatively tests whether at least one array element in a provided array
34
passes a test implemented by a predicate function, while iterating from
@@ -27,9 +28,9 @@
2728

2829
Examples
2930
--------
30-
> function isPositive( v ) { return ( v > 0 ); };
31+
> function predicate( v ) { return ( v > 0 ); };
3132
> var x = [ 1, 1, 0, 0, 0 ];
32-
> var y = {{alias}}( x, isPositive )
33+
> var y = {{alias}}( x, predicate )
3334
[ false, false, false, true, true ]
3435

3536

@@ -71,10 +72,10 @@
7172

7273
Examples
7374
--------
74-
> function isPositive( v ) { return ( v > 0 ); };
7575
> var x = [ 1, 1, 0, 0 ];
7676
> var out = [ false, null, false, null, false, null, false, null ];
77-
> var arr = {{alias}}.assign( x, out, 2, 0, isPositive )
77+
> function predicate( v ) { return ( v > 0 ); };
78+
> var arr = {{alias}}.assign( x, out, 2, 0, predicate )
7879
[ false, null, ..., true, null ]
7980
> var bool = ( arr === out )
8081
true

base/cuany-by-right/docs/types/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ interface CuanyByRight {
100100
*
101101
* @example
102102
* function isPositive( v ) {
103-
* return v > 0;
103+
* return v > 0;
104104
* }
105105
* var x = [ 1, 1, 0, 0, 0 ];
106106
* var y = [ false, null, false, null, false, null, false, null, false, null ];
@@ -172,7 +172,7 @@ interface CuanyByRight {
172172
*
173173
* @example
174174
* function isPositive( v ) {
175-
* return v > 0;
175+
* return v > 0;
176176
* }
177177
* var x = [ 1, 1, 0, 0, 0 ];
178178
*
@@ -181,7 +181,7 @@ interface CuanyByRight {
181181
*
182182
* @example
183183
* function isPositive( v ) {
184-
* return v > 0;
184+
* return v > 0;
185185
* }
186186
* var x = [ 0, 1, 1, 0, 0 ];
187187
* var y = [ false, null, false, null, false, null, false, null, false, null ];

base/cuany-by-right/docs/types/test.ts

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* limitations under the License.
1717
*/
1818

19-
2019
import cuanyByRight = require( './index' );
2120

2221
/**
@@ -57,7 +56,24 @@ function isPositive( value: number ): boolean {
5756
cuanyByRight( new Uint8ClampedArray( [ 1, 2, 3 ] ), isPositive, {} ); // $ExpectType boolean[]
5857
}
5958

60-
// The compiler throws an error if the function is provided a first argument which is not like a function..
59+
// The compiler throws an error if the function is provided a first argument which is not an array-like object...
60+
{
61+
cuanyByRight( 1, isPositive ); // $ExpectError
62+
cuanyByRight( true, isPositive ); // $ExpectError
63+
cuanyByRight( false, isPositive ); // $ExpectError
64+
cuanyByRight( null, isPositive ); // $ExpectError
65+
cuanyByRight( void 0, isPositive ); // $ExpectError
66+
cuanyByRight( {}, isPositive ); // $ExpectError
67+
68+
cuanyByRight( 1, isPositive, {} ); // $ExpectError
69+
cuanyByRight( true, isPositive, {} ); // $ExpectError
70+
cuanyByRight( false, isPositive, {} ); // $ExpectError
71+
cuanyByRight( null, isPositive, {} ); // $ExpectError
72+
cuanyByRight( void 0, isPositive, {} ); // $ExpectError
73+
cuanyByRight( {}, isPositive, {} ); // $ExpectError
74+
}
75+
76+
// The compiler throws an error if the function is provided a second argument which is not function...
6177
{
6278
const x = [ 1, 2, 3, 4 ];
6379

@@ -87,7 +103,7 @@ function isPositive( value: number ): boolean {
87103
const y = [ false, null, false, null, false, null, false, null, false, null ];
88104

89105
cuanyByRight.assign( x, y, 2, 0, isPositive ); // $ExpectType (boolean | null)[]
90-
cuanyByRight.assign( x, y, 2, 0, isPositive, {} ); // $ExpectType (boolean | null)[]
106+
cuanyByRight.assign( x, y, 2, 0, isPositive, {} ); // $ExpectType (boolean | null)[]
91107
cuanyByRight.assign( x, new Float64Array( 4 ), 1, 0, isPositive ); // $ExpectType Float64Array
92108
cuanyByRight.assign( x, new Float32Array( 4 ), 1, 0, isPositive ); // $ExpectType Float32Array
93109
cuanyByRight.assign( x, new Int32Array( 4 ), 1, 0, isPositive ); // $ExpectType Int32Array
@@ -148,7 +164,6 @@ function isPositive( value: number ): boolean {
148164
cuanyByRight.assign( x, {}, 2, 0, isPositive, {} ); // $ExpectError
149165
}
150166

151-
152167
// The compiler throws an error if the `assign` method is provided a third argument which is not a number...
153168
{
154169
const x = [ false, false, true, false, false ];
@@ -193,7 +208,7 @@ function isPositive( value: number ): boolean {
193208
cuanyByRight.assign( x, y, 1, [], isPositive, {} ); // $ExpectError
194209
}
195210

196-
// The compiler throws an error if the `assign` method is provided a fourth argument which is not like a function...
211+
// The compiler throws an error if the `assign` method is provided a fifth argument which is not like a function...
197212
{
198213
const x = [ false, false, true, false, false ];
199214
const y = [ false, null, false, null, false, null, false, null, false, null ];

base/cuany-by-right/lib/index.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,11 @@
4444
*
4545
* var x = [ 0, 1, 0, 0, 0 ];
4646
*
47-
* var y1 = cuanyByRight( x, isPositive );
48-
* // returns [ false, false, false, true, true ]
49-
*
50-
* var y2 = [ false, null, false, null, false, null, false, null, false, null ];
51-
* var out = cuanyByRight.assign( x, y2, 2, 0, isPositive );
47+
* var y = [ false, null, false, null, false, null, false, null, false, null ];
48+
* var out = cuanyByRight.assign( x, y, 2, 0, isPositive );
5249
* // returns [ false, null, false, null, false, null, true, null, true, null ]
5350
*
54-
* var bool = ( out === y2 );
51+
* var bool = ( out === y );
5552
* // returns true
5653
*/
5754

base/cuany-by/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ function isPositive( value ) {
127127
var x = bernoulli( 10, 0.1 );
128128
console.log( x );
129129

130+
// Cumulatively determine whether at least one element is positive:
130131
var out = cuanyBy( x, isPositive );
131132
console.log( out );
132133
```

base/cuany-by/benchmark/benchmark.length.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var isArray = require( '@stdlib/assert/is-array' );
2626
var filled = require( './../../../base/filled' );
2727
var isPositiveInteger = require( '@stdlib/assert/is-positive-integer' ).isPrimitive;
2828
var pkg = require( './../../../base/cuany-by/package.json' ).name;
29-
var cuanyBy = require( './../../../base/cuany-by/lib' );
29+
var cuanyBy = require( './../lib' );
3030

3131

3232
// FUNCTIONS //
@@ -39,7 +39,7 @@ var cuanyBy = require( './../../../base/cuany-by/lib' );
3939
* @returns {Function} benchmark function
4040
*/
4141
function createBenchmark( len ) {
42-
var x = filled( 1.5, len );
42+
var x = filled( 0, len );
4343
return benchmark;
4444

4545
/**

base/cuany-by/docs/repl.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
predicate: Function
5656
Predicate function.
5757

58+
thisArg: any (optional)
59+
Execution context.
60+
5861
Returns
5962
-------
6063
y: ArrayLikeObject

base/cuany-by/docs/types/test.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,24 @@ function isPositive( value: number ): boolean {
5656
cuanyBy( new Uint8ClampedArray( [ 1, 2, 3 ] ), isPositive, {} ); // $ExpectType boolean[]
5757
}
5858

59-
// The compiler throws an error if the function is provided a first argument which is not like a function..
59+
// The compiler throws an error if the function is provided a first argument which is not an array-like object...
60+
{
61+
cuanyBy( 1, isPositive ); // $ExpectError
62+
cuanyBy( true, isPositive ); // $ExpectError
63+
cuanyBy( false, isPositive ); // $ExpectError
64+
cuanyBy( null, isPositive ); // $ExpectError
65+
cuanyBy( void 0, isPositive ); // $ExpectError
66+
cuanyBy( {}, isPositive ); // $ExpectError
67+
68+
cuanyBy( 1, isPositive, {} ); // $ExpectError
69+
cuanyBy( true, isPositive, {} ); // $ExpectError
70+
cuanyBy( false, isPositive, {} ); // $ExpectError
71+
cuanyBy( null, isPositive, {} ); // $ExpectError
72+
cuanyBy( void 0, isPositive, {} ); // $ExpectError
73+
cuanyBy( {}, isPositive, {} ); // $ExpectError
74+
}
75+
76+
// The compiler throws an error if the function is provided a second argument which is not function...
6077
{
6178
const x = [ 1, 2, 3, 4 ];
6279

@@ -147,7 +164,6 @@ function isPositive( value: number ): boolean {
147164
cuanyBy.assign( x, {}, 2, 0, isPositive, {} ); // $ExpectError
148165
}
149166

150-
151167
// The compiler throws an error if the `assign` method is provided a third argument which is not a number...
152168
{
153169
const x = [ false, false, true, false, false ];
@@ -192,7 +208,7 @@ function isPositive( value: number ): boolean {
192208
cuanyBy.assign( x, y, 1, [], isPositive, {} ); // $ExpectError
193209
}
194210

195-
// The compiler throws an error if the `assign` method is provided a fourth argument which is not like a function...
211+
// The compiler throws an error if the `assign` method is provided a fifth argument which is not like a function...
196212
{
197213
const x = [ false, false, true, false, false ];
198214
const y = [ false, null, false, null, false, null, false, null, false, null ];

0 commit comments

Comments
 (0)