Skip to content

Commit d05b88f

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents 2d7dda3 + b723a6e commit d05b88f

File tree

252 files changed

+8726
-8629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

252 files changed

+8726
-8629
lines changed

lib/node_modules/@stdlib/array/base/cunone-by-right/README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# cunoneByRight
2222

23-
> Cumulatively test whether no array element in a provided array passes a test implemented by a predicate function, while iterating from right-to-left.
23+
> Cumulatively test whether every array element in a provided array fails a test implemented by a predicate function, while iterating from right-to-left.
2424
2525
<section class="usage">
2626

@@ -32,7 +32,7 @@ var cunoneByRight = require( '@stdlib/array/base/cunone-by-right' );
3232

3333
#### cunoneByRight( x, predicate\[, thisArg ] )
3434

35-
Cumulatively tests whether no array element in a provided array passes a test implemented by a `predicate` function, while iterating from right-to-left.
35+
Cumulatively tests whether every array element in a provided array fails a test implemented by a `predicate` function, while iterating from right-to-left.
3636

3737
```javascript
3838
function fcn( value ) {
@@ -45,25 +45,6 @@ var y = cunoneByRight( x, fcn );
4545
// returns [ true, true, true, false, false ];
4646
```
4747

48-
#### cunoneByRight.assign( x, out, stride, offset, predicate\[, thisArg ] )
49-
50-
Cumulatively tests whether no array element in a provided array passes a test implemented by a `predicate` function, while iterating from right-to-left, and assigns the results to the elements in the output array.
51-
52-
```javascript
53-
function fcn( v ) {
54-
return v > 0;
55-
}
56-
57-
var x = [ 1, 1, 0, 0, 0 ];
58-
var y = [ false, null, false, null, false, null, false, null, false, null ];
59-
60-
var out = cunoneByRight.assign( x, y, 2, 0, fcn );
61-
// returns [ true, null, true, null, true, null, false, null, false, null ]
62-
63-
var bool = ( out === y );
64-
// returns true
65-
```
66-
6748
The invoked `predicate` function is provided three arguments:
6849

6950
- **value**: collection element.
@@ -91,6 +72,25 @@ var count = context.count;
9172
// returns 4
9273
```
9374

75+
#### cunoneByRight.assign( x, out, stride, offset, predicate\[, thisArg ] )
76+
77+
Cumulatively test whether every array element in a provided array fails a test implemented by a `predicate` function, while iterating from right-to-left, and assigns the results to the elements in the output array.
78+
79+
```javascript
80+
function fcn( v ) {
81+
return v > 0;
82+
}
83+
84+
var x = [ 1, 1, 0, 0, 0 ];
85+
var y = [ false, null, false, null, false, null, false, null, false, null ];
86+
87+
var out = cunoneByRight.assign( x, y, 2, 0, fcn );
88+
// returns [ true, null, true, null, true, null, false, null, false, null ]
89+
90+
var bool = ( out === y );
91+
// returns true
92+
```
93+
9494
</section>
9595

9696
<!-- /.usage -->

lib/node_modules/@stdlib/array/base/cunone-by-right/docs/repl.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
{{alias}}( x, predicate[, thisArg] )
3-
Cumulatively tests whether no array element in a provided array passes a
4-
test implemented by a predicate function, while iterating from
5-
right-to-left.
3+
Cumulatively tests whether every array element in a provided array fails a
4+
test implemented by a predicate function, while iterating from right-to-
5+
left.
66

77
The predicate function is provided three arguments:
88

@@ -35,9 +35,9 @@
3535

3636

3737
{{alias}}.assign( x, out, stride, offset, predicate[, thisArg] )
38-
Cumulatively tests whether no array element in a provided array passes a
39-
test implemented by a predicate function, while iterating from
40-
right-to-left, and assign the results to the provided output array.
38+
Cumulatively tests whether every array element in a provided array fails a
39+
test implemented by a predicate function, while iterating from right-to-
40+
left, and assigns the results to the provided output array.
4141

4242
The predicate function is provided three arguments:
4343

lib/node_modules/@stdlib/array/base/cunone-by-right/docs/types/index.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ type Predicate<T, U> = Nullary<U> | Unary<T, U> | Binary<T, U> | Ternary<T, U>;
7171
*/
7272
interface CunoneByRight {
7373
/**
74-
* Cumulatively test whether no array element in a provided array passes a test implemented by a predicate function, while iterating from right-to-left.
74+
* Cumulatively tests whether every array element in a provided array fails a test implemented by a predicate function, while iterating from right-to-left.
7575
*
7676
* @param x - input array
7777
* @param predicate - test function
@@ -90,7 +90,7 @@ interface CunoneByRight {
9090
<T = unknown, U = unknown>( x: Collection<T> | AccessorArrayLike<T>, predicate: Predicate<T, U>, thisArg?: ThisParameterType<Predicate<T, U>> ): Array<boolean>;
9191

9292
/**
93-
* Cumulatively tests whether no array element in a provided array passes a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to the provided output array.
93+
* Cumulatively tests whether every array element in a provided array fails a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to the provided output array.
9494
*
9595
* @param x - input array
9696
* @param y - output array
@@ -113,7 +113,7 @@ interface CunoneByRight {
113113
assign<T = unknown, U = unknown, V = unknown>( x: Collection<T> | AccessorArrayLike<T>, out: Array<U>, stride: number, offset: number, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): Array<U | boolean>;
114114

115115
/**
116-
* Cumulatively tests whether no array element in a provided array passes a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to the provided output array.
116+
* Cumulatively tests whether every array element in a provided array fails a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to the provided output array.
117117
*
118118
* @param x - input array
119119
* @param out - output array
@@ -141,7 +141,7 @@ interface CunoneByRight {
141141
assign<T, U extends TypedArray | BooleanArray, V = unknown>( x: Collection<T> | AccessorArrayLike<T>, out: U, stride: number, offset: number, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): U;
142142

143143
/**
144-
* Cumulatively tests whether no array element in a provided array passes a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to the provided output array.
144+
* Cumulatively tests whether every array element in a provided array fails a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to the provided output array.
145145
*
146146
* @param x - input array
147147
* @param out - output array
@@ -158,7 +158,7 @@ interface CunoneByRight {
158158
* var x = [ 0, 0, 0, 1, 0 ];
159159
* var y = [ false, null, false, null, false, null, false, null, false, null ];
160160
*
161-
* var arr = cunoneBy.cunoneByRight( x, y, 2, 0, isPositive );,
161+
* var arr = cunoneBy.assign( x, y, 2, 0, isPositive );,
162162
* // returns [ true, null, false, null, false, null, false, null, false, null ]
163163
*/
164164
assign<T = unknown, U = unknown, V = unknown>( x: Collection<T> | AccessorArrayLike<T>, out: Collection<U> | AccessorArrayLike<U>, stride: number, offset: number, predicate: Predicate<T, V>, thisArg?: ThisParameterType<Predicate<T, V>> ): Collection<U | boolean> | AccessorArrayLike<U | boolean>;

lib/node_modules/@stdlib/array/base/cunone-by-right/lib/assign.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ var arraylike2object = require( '@stdlib/array/base/arraylike2object' );
2626
// FUNCTIONS //
2727

2828
/**
29-
* Cumulatively tests whether no element in a provided array passes a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to elements in the provided output array.
29+
* Cumulatively tests whether every array element in a provided array fails a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to elements in the provided output array.
3030
*
3131
* @private
3232
* @param {Collection} x - input array
3333
* @param {Collection} out - output array
3434
* @param {integer} stride - output array stride
3535
* @param {NonNegativeInteger} offset - output array offset
3636
* @param {Function} predicate - test function
37-
* @param {*} [thisArg] - execution context
37+
* @param {*} thisArg - execution context
3838
* @returns {Collection} output array
3939
*
4040
* @example
@@ -56,7 +56,7 @@ function indexed( x, out, stride, offset, predicate, thisArg ) {
5656
flg = true;
5757
io = offset;
5858
for ( i = x.length - 1; i >= 0; i-- ) {
59-
if ( flg === true && predicate.call( thisArg, x[ i ], i, x ) ) {
59+
if ( flg && predicate.call( thisArg, x[ i ], i, x ) ) {
6060
flg = false;
6161
}
6262
out[ io ] = flg;
@@ -66,15 +66,15 @@ function indexed( x, out, stride, offset, predicate, thisArg ) {
6666
}
6767

6868
/**
69-
* Cumulatively tests whether no element in a provided accessor array passes a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to elements in the accessor output array.
69+
* Cumulatively tests whether every array element in a provided array fails a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to elements in the accessor output array.
7070
*
7171
* @private
7272
* @param {Object} x - input array object
7373
* @param {Object} out - output array object
7474
* @param {integer} stride - output array stride
7575
* @param {NonNegativeInteger} offset - output array offset
7676
* @param {Function} predicate - test function
77-
* @param {*} [thisArg] - execution context
77+
* @param {*} thisArg - execution context
7878
* @returns {Collection} output array
7979
*
8080
* @example
@@ -111,8 +111,7 @@ function accessors( x, out, stride, offset, predicate, thisArg ) {
111111
io = offset;
112112
flg = true;
113113
for ( i = xdata.length - 1; i >= 0; i-- ) {
114-
if ( flg === true &&
115-
predicate.call( thisArg, xget( xdata, i ), i, xdata ) ) {
114+
if ( flg && predicate.call( thisArg, xget( xdata, i ), i, xdata ) ) {
116115
flg = false;
117116
}
118117
oset( odata, io, flg );
@@ -125,7 +124,7 @@ function accessors( x, out, stride, offset, predicate, thisArg ) {
125124
// MAIN //
126125

127126
/**
128-
* Cumulatively tests whether no element in a provided array passes a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to elements in the output array.
127+
* Cumulatively tests whether every array element in a provided array fails a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to elements in the output array.
129128
*
130129
* @param {Collection} x - input array
131130
* @param {Collection} out - output array

lib/node_modules/@stdlib/array/base/cunone-by-right/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
'use strict';
2020

2121
/**
22-
* Cumulatively test whether no element in a provided array passes a test implemented by a predicate function, while iterating from right-to-left.
22+
* Cumulatively test whether every array element in a provided array fails a test implemented by a predicate function, while iterating from right-to-left.
2323
*
2424
* @module @stdlib/array/base/cunone-by-right
2525
*

lib/node_modules/@stdlib/array/base/cunone-by-right/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var assign = require( './assign.js' );
2727
// MAIN //
2828

2929
/**
30-
* Cumulatively tests whether no element in a provided array passes a test implemented by a predicate function, while iterating from right-to-left.
30+
* Cumulatively tests whether every array element in a provided array fails a test implemented by a predicate function, while iterating from right-to-left.
3131
*
3232
* @param {Collection} x - input array
3333
* @param {Function} predicate - test function

lib/node_modules/@stdlib/array/base/cunone-by-right/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@stdlib/array/base/cunone-by-right",
33
"version": "0.0.0",
4-
"description": "Cumulatively test whether no array element in a provided array passes a test implemented by a predicate function, while iterating from right-to-left.",
4+
"description": "Cumulatively test whether every array element in a provided array fails a test implemented by a predicate function, while iterating from right-to-left.",
55
"license": "Apache-2.0",
66
"author": {
77
"name": "The Stdlib Authors",

0 commit comments

Comments
 (0)