You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cumulatively tests whether at least `n` elements in a provided array pass a test implemented by a `predicate` function, while iterating from right-to-left and assign the results to the elements in the output array.
77
+
Cumulatively tests whether at least `n` elements in a provided array pass a test implemented by a `predicate` function, while iterating from right-to-left, and assigns the results to the elements in the output array.
* Cumulatively test whether at least `n` elements in a provided array pass a test implemented by a predicate function, while iterating from right-to-left.
74
+
* Cumulatively tests whether at least `n` elements in a provided array pass a test implemented by a predicate function, while iterating from right-to-left.
* Cumulatively test whether at least `n` elements in a provided array pass a test implemented by a predicate function, while iterating from right-to-left and assigns the results to the provided output array.
94
+
* Cumulatively tests whether at least `n` elements in a provided array pass a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to the provided output array.
* Cumulatively test whether at least `n` elements in a provided array pass a test implemented by a predicate function, while iterating from right-to-left and assigns the results to the provided output array.
118
+
* Cumulatively tests whether at least `n` elements in a provided array pass a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to the provided output array.
119
119
*
120
120
* @param x - input array
121
121
* @param n - number of elements
@@ -127,19 +127,24 @@ interface CusomeByRight {
127
127
* @returns output array
128
128
*
129
129
* @example
130
-
* function fcn( v ) {
131
-
* return v > 0;
130
+
* var BooleanArray = require( '@stdlib/array/bool' );
131
+
*
132
+
* function isPositive( v ) {
133
+
* return ( v > 0 );
132
134
* }
133
-
* var x = [ 1, 1, 0, 0, 0 ];
134
-
* var y = [ false, null, false, null, false, null, false, null, false, null ];
135
+
* var x = [ 0, 0, 0, 1, 0 ];
136
+
* var y = new BooleanArray( [ false, false, false, false, false, false, false, false, false, false ] );
135
137
*
136
-
* var arr = cusomeByRight.assign( x, 2, y, 2, 0, fcn );,
* 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.
147
+
* Cumulatively tests whether at least `n` elements 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.
143
148
*
144
149
* @param x - input array
145
150
* @param n - number of elements
@@ -151,14 +156,14 @@ interface CusomeByRight {
151
156
* @returns output array
152
157
*
153
158
* @example
154
-
* function isPositive( v ) {
155
-
* return ( v > 0 );
159
+
* function fcn( v ) {
160
+
* return v > 0;
156
161
* }
157
-
* var x = [ 0, 0, 0, 1, 0 ];
162
+
* var x = [ 1, 1, 0, 0, 0 ];
158
163
* var y = [ false, null, false, null, false, null, false, null, false, null ];
159
164
*
160
-
* var arr = cunoneBy.cunoneByRight( x, y, 2, 0, isPositive );,
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/array/base/cusome-by-right/lib/assign.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ var arraylike2object = require( '@stdlib/array/base/arraylike2object' );
26
26
// FUNCTIONS //
27
27
28
28
/**
29
-
* Cumulatively test whether at least `n` elements in a provided array pass a test implemented by a predicate function, while iterating from right-to-left and assign the results to elements in the provided output array.
29
+
* Cumulatively tests whether at least `n` elements in a provided array pass a test implemented by a predicate function, while iterating from right-to-left, and assign the results to elements in the provided output array.
30
30
*
31
31
* @private
32
32
* @param {Collection} x - input array
@@ -35,7 +35,7 @@ var arraylike2object = require( '@stdlib/array/base/arraylike2object' );
@@ -72,7 +72,7 @@ function indexed( x, n, out, stride, offset, predicate, thisArg ) {
72
72
}
73
73
74
74
/**
75
-
* Cumulatively test whether at least `n` elements in a provided accessor array pass a test implemented by a predicate function, while iterating from right-to-left and assign the results to elements in the accessor output array.
75
+
* Cumulatively tests whether at least `n` elements in a provided accessor array pass a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to elements in the accessor output array.
76
76
*
77
77
* @private
78
78
* @param {Object} x - input array object
@@ -81,7 +81,7 @@ function indexed( x, n, out, stride, offset, predicate, thisArg ) {
@@ -137,7 +137,7 @@ function accessors( x, n, out, stride, offset, predicate, thisArg ) {
137
137
// MAIN //
138
138
139
139
/**
140
-
* Cumulatively test whether at least `n` elements in a provided array pass a test implemented by a predicate function, while iterating from right-to-left and assign the results to elements in the output array.
140
+
* Cumulatively tests whether at least `n` elements in a provided array pass a test implemented by a predicate function, while iterating from right-to-left, and assigns the results to elements in the output array.
0 commit comments