Skip to content

Commit c4cbfda

Browse files
committed
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into develop
2 parents b079d65 + d626ffa commit c4cbfda

File tree

4 files changed

+152
-4
lines changed

4 files changed

+152
-4
lines changed

lib/node_modules/@stdlib/array/base/assert/docs/types/index.d.ts

+72
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import contains = require( '@stdlib/array/base/assert/contains' );
2424
import hasSameValues = require( '@stdlib/array/base/assert/has-same-values' );
2525
import isAccessorArray = require( '@stdlib/array/base/assert/is-accessor-array' );
26+
import isBooleanDataType = require( '@stdlib/array/base/assert/is-boolean-data-type' );
27+
import isBooleanArray = require( '@stdlib/array/base/assert/is-booleanarray' );
2628
import isComplexFloatingPointDataType = require( '@stdlib/array/base/assert/is-complex-floating-point-data-type' );
2729
import isComplexTypedArray = require( '@stdlib/array/base/assert/is-complex-typed-array' );
2830
import isComplex64Array = require( '@stdlib/array/base/assert/is-complex64array' );
@@ -106,6 +108,76 @@ interface Namespace {
106108
*/
107109
isAccessorArray: typeof isAccessorArray;
108110

111+
/**
112+
* Tests whether an input value is a supported array boolean data type.
113+
*
114+
* @param v - value to test
115+
* @returns boolean indicating whether an input value is a supported array boolean data type
116+
*
117+
* @example
118+
* var bool = ns.isBooleanDataType( 'bool' );
119+
* // returns true
120+
*
121+
* bool = ns.isBooleanDataType( 'complex64' );
122+
* // returns false
123+
*
124+
* bool = ns.isBooleanDataType( 'complex128' );
125+
* // returns false
126+
*
127+
* bool = ns.isBooleanDataType( 'float32' );
128+
* // returns false
129+
*
130+
* bool = ns.isBooleanDataType( 'float64' );
131+
* // returns false
132+
*
133+
* bool = ns.isBooleanDataType( 'generic' );
134+
* // returns false
135+
*
136+
* bool = ns.isBooleanDataType( 'int16' );
137+
* // returns false
138+
*
139+
* bool = ns.isBooleanDataType( 'int32' );
140+
* // returns false
141+
*
142+
* bool = ns.isBooleanDataType( 'int8' );
143+
* // returns false
144+
*
145+
* bool = ns.isBooleanDataType( 'uint16' );
146+
* // returns false
147+
*
148+
* bool = ns.isBooleanDataType( 'uint32' );
149+
* // returns false
150+
*
151+
* bool = ns.isBooleanDataType( 'uint8' );
152+
* // returns false
153+
*
154+
* bool = ns.isBooleanDataType( 'uint8c' );
155+
* // returns false
156+
*
157+
* bool = ns.isBooleanDataType( 'foo' );
158+
* // returns false
159+
*/
160+
isBooleanDataType: typeof isBooleanDataType;
161+
162+
/**
163+
* Tests if a value is a `BooleanArray`.
164+
*
165+
* @param value - value to test
166+
* @returns boolean indicating whether a value is a `BooleanArray`
167+
*
168+
* @example
169+
* var BooleanArray = require( '@stdlib/array/bool' );
170+
*
171+
* var arr = new BooleanArray( 10 );
172+
* var bool = ns.isBooleanArray( arr );
173+
* // returns true
174+
*
175+
* @example
176+
* var bool = ns.isBooleanArray( [] );
177+
* // returns false
178+
*/
179+
isBooleanArray: typeof isBooleanArray;
180+
109181
/**
110182
* Tests whether an input value is a supported array complex-valued floating-point data type.
111183
*

lib/node_modules/@stdlib/array/base/docs/types/index.d.ts

+77
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ import countIf = require( '@stdlib/array/base/count-if' );
6868
import countSameValue = require( '@stdlib/array/base/count-same-value' );
6969
import countSameValueZero = require( '@stdlib/array/base/count-same-value-zero' );
7070
import countTruthy = require( '@stdlib/array/base/count-truthy' );
71+
import cuany = require( '@stdlib/array/base/cuany' );
72+
import cuevery = require( '@stdlib/array/base/cuevery' );
7173
import dedupe = require( '@stdlib/array/base/dedupe' );
7274
import every = require( '@stdlib/array/base/every' );
7375
import everyBy = require( '@stdlib/array/base/every-by' );
@@ -143,6 +145,7 @@ import ones3d = require( '@stdlib/array/base/ones3d' );
143145
import ones4d = require( '@stdlib/array/base/ones4d' );
144146
import ones5d = require( '@stdlib/array/base/ones5d' );
145147
import onesnd = require( '@stdlib/array/base/onesnd' );
148+
import put = require( '@stdlib/array/base/put' );
146149
import quaternary2d = require( '@stdlib/array/base/quaternary2d' );
147150
import quaternary3d = require( '@stdlib/array/base/quaternary3d' );
148151
import quaternary4d = require( '@stdlib/array/base/quaternary4d' );
@@ -1420,6 +1423,48 @@ interface Namespace {
14201423
*/
14211424
countTruthy: typeof countTruthy;
14221425

1426+
/**
1427+
* Cumulatively tests whether at least one element in a provided array is truthy.
1428+
*
1429+
* @param x - input array
1430+
* @returns output array
1431+
*
1432+
* @example
1433+
* var x = [ false, false, true, false, false ];
1434+
*
1435+
* var result = ns.cuany( x );
1436+
* // returns [ false, false, true, true, true ]
1437+
*
1438+
* @example
1439+
* var x = [ false, false, true, false, false ];
1440+
* var y = [ false, null, false, null, false, null, false, null, false, null ];
1441+
*
1442+
* var arr = ns.cuany.assign( x, y, 2, 0 );
1443+
* // returns [ false, null, false, null, true, null, true, null, true, null ]
1444+
*/
1445+
cuany: typeof cuany;
1446+
1447+
/**
1448+
* Cumulatively tests whether every element in a provided array is truthy.
1449+
*
1450+
* @param x - input array
1451+
* @returns output array
1452+
*
1453+
* @example
1454+
* var x = [ true, true, true, false, true ];
1455+
*
1456+
* var result = ns.cuevery( x );
1457+
* // returns [ true, true, true, false, false ];
1458+
*
1459+
* @example
1460+
* var x = [ true, true, true, false, true ];
1461+
* var y = [ false, null, false, null, false, null, false, null, false, null ];
1462+
*
1463+
* var arr = ns.cuevery.assign( x, y, 2, 0 );
1464+
* // returns [ true, null, true, null, true, null, false, null, false, null ];
1465+
*/
1466+
cuevery: typeof cuevery;
1467+
14231468
/**
14241469
* Removes consecutive duplicated values.
14251470
*
@@ -3098,6 +3143,38 @@ interface Namespace {
30983143
*/
30993144
onesnd: typeof onesnd;
31003145

3146+
/**
3147+
* Replaces specified elements of an array with provided values.
3148+
*
3149+
* @param x - input array
3150+
* @param indices - list of element indices
3151+
* @param values - values to set
3152+
* @param mode - index mode
3153+
* @returns input array
3154+
*
3155+
* @example
3156+
* var x = [ 1, 2, 3, 4 ];
3157+
*
3158+
* var indices = [ 1, 2 ];
3159+
* var values = [ 20, 30 ];
3160+
*
3161+
* var out = ns.put( x, indices, values, 'throw' );
3162+
* // returns [ 1, 20, 30, 4 ]
3163+
*
3164+
* var bool = ( out === x );
3165+
* // returns true
3166+
*
3167+
* @example
3168+
* var x = [ 1, 2, 3, 4 ];
3169+
*
3170+
* var out = ns.put( x, [ 1, 2 ], [ 30 ], 'throw' );
3171+
* // returns [ 1, 30, 30, 4 ]
3172+
*
3173+
* var bool = ( out === x );
3174+
* // returns true
3175+
*/
3176+
put: typeof put;
3177+
31013178
/**
31023179
* Applies a quaternary callback to elements in four two-dimensional nested input arrays and assigns results to elements in a two-dimensional nested output array.
31033180
*

0 commit comments

Comments
 (0)