diff --git a/lib/node_modules/@stdlib/array/base/assert/docs/types/index.d.ts b/lib/node_modules/@stdlib/array/base/assert/docs/types/index.d.ts index 629f5d39bd0..b8e9836a30e 100644 --- a/lib/node_modules/@stdlib/array/base/assert/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/array/base/assert/docs/types/index.d.ts @@ -23,6 +23,8 @@ import contains = require( '@stdlib/array/base/assert/contains' ); import hasSameValues = require( '@stdlib/array/base/assert/has-same-values' ); import isAccessorArray = require( '@stdlib/array/base/assert/is-accessor-array' ); +import isBooleanDataType = require( '@stdlib/array/base/assert/is-boolean-data-type' ); +import isBooleanArray = require( '@stdlib/array/base/assert/is-booleanarray' ); import isComplexFloatingPointDataType = require( '@stdlib/array/base/assert/is-complex-floating-point-data-type' ); import isComplexTypedArray = require( '@stdlib/array/base/assert/is-complex-typed-array' ); import isComplex64Array = require( '@stdlib/array/base/assert/is-complex64array' ); @@ -106,6 +108,76 @@ interface Namespace { */ isAccessorArray: typeof isAccessorArray; + /** + * Tests whether an input value is a supported array boolean data type. + * + * @param v - value to test + * @returns boolean indicating whether an input value is a supported array boolean data type + * + * @example + * var bool = ns.isBooleanDataType( 'bool' ); + * // returns true + * + * bool = ns.isBooleanDataType( 'complex64' ); + * // returns false + * + * bool = ns.isBooleanDataType( 'complex128' ); + * // returns false + * + * bool = ns.isBooleanDataType( 'float32' ); + * // returns false + * + * bool = ns.isBooleanDataType( 'float64' ); + * // returns false + * + * bool = ns.isBooleanDataType( 'generic' ); + * // returns false + * + * bool = ns.isBooleanDataType( 'int16' ); + * // returns false + * + * bool = ns.isBooleanDataType( 'int32' ); + * // returns false + * + * bool = ns.isBooleanDataType( 'int8' ); + * // returns false + * + * bool = ns.isBooleanDataType( 'uint16' ); + * // returns false + * + * bool = ns.isBooleanDataType( 'uint32' ); + * // returns false + * + * bool = ns.isBooleanDataType( 'uint8' ); + * // returns false + * + * bool = ns.isBooleanDataType( 'uint8c' ); + * // returns false + * + * bool = ns.isBooleanDataType( 'foo' ); + * // returns false + */ + isBooleanDataType: typeof isBooleanDataType; + + /** + * Tests if a value is a `BooleanArray`. + * + * @param value - value to test + * @returns boolean indicating whether a value is a `BooleanArray` + * + * @example + * var BooleanArray = require( '@stdlib/array/bool' ); + * + * var arr = new BooleanArray( 10 ); + * var bool = ns.isBooleanArray( arr ); + * // returns true + * + * @example + * var bool = ns.isBooleanArray( [] ); + * // returns false + */ + isBooleanArray: typeof isBooleanArray; + /** * Tests whether an input value is a supported array complex-valued floating-point data type. * diff --git a/lib/node_modules/@stdlib/array/base/docs/types/index.d.ts b/lib/node_modules/@stdlib/array/base/docs/types/index.d.ts index 7abd502ffcc..a06441bac9b 100644 --- a/lib/node_modules/@stdlib/array/base/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/array/base/docs/types/index.d.ts @@ -68,6 +68,8 @@ import countIf = require( '@stdlib/array/base/count-if' ); import countSameValue = require( '@stdlib/array/base/count-same-value' ); import countSameValueZero = require( '@stdlib/array/base/count-same-value-zero' ); import countTruthy = require( '@stdlib/array/base/count-truthy' ); +import cuany = require( '@stdlib/array/base/cuany' ); +import cuevery = require( '@stdlib/array/base/cuevery' ); import dedupe = require( '@stdlib/array/base/dedupe' ); import every = require( '@stdlib/array/base/every' ); import everyBy = require( '@stdlib/array/base/every-by' ); @@ -143,6 +145,7 @@ import ones3d = require( '@stdlib/array/base/ones3d' ); import ones4d = require( '@stdlib/array/base/ones4d' ); import ones5d = require( '@stdlib/array/base/ones5d' ); import onesnd = require( '@stdlib/array/base/onesnd' ); +import put = require( '@stdlib/array/base/put' ); import quaternary2d = require( '@stdlib/array/base/quaternary2d' ); import quaternary3d = require( '@stdlib/array/base/quaternary3d' ); import quaternary4d = require( '@stdlib/array/base/quaternary4d' ); @@ -1420,6 +1423,48 @@ interface Namespace { */ countTruthy: typeof countTruthy; + /** + * Cumulatively tests whether at least one element in a provided array is truthy. + * + * @param x - input array + * @returns output array + * + * @example + * var x = [ false, false, true, false, false ]; + * + * var result = ns.cuany( x ); + * // returns [ false, false, true, true, true ] + * + * @example + * var x = [ false, false, true, false, false ]; + * var y = [ false, null, false, null, false, null, false, null, false, null ]; + * + * var arr = ns.cuany.assign( x, y, 2, 0 ); + * // returns [ false, null, false, null, true, null, true, null, true, null ] + */ + cuany: typeof cuany; + + /** + * Cumulatively tests whether every element in a provided array is truthy. + * + * @param x - input array + * @returns output array + * + * @example + * var x = [ true, true, true, false, true ]; + * + * var result = ns.cuevery( x ); + * // returns [ true, true, true, false, false ]; + * + * @example + * var x = [ true, true, true, false, true ]; + * var y = [ false, null, false, null, false, null, false, null, false, null ]; + * + * var arr = ns.cuevery.assign( x, y, 2, 0 ); + * // returns [ true, null, true, null, true, null, false, null, false, null ]; + */ + cuevery: typeof cuevery; + /** * Removes consecutive duplicated values. * @@ -3098,6 +3143,38 @@ interface Namespace { */ onesnd: typeof onesnd; + /** + * Replaces specified elements of an array with provided values. + * + * @param x - input array + * @param indices - list of element indices + * @param values - values to set + * @param mode - index mode + * @returns input array + * + * @example + * var x = [ 1, 2, 3, 4 ]; + * + * var indices = [ 1, 2 ]; + * var values = [ 20, 30 ]; + * + * var out = ns.put( x, indices, values, 'throw' ); + * // returns [ 1, 20, 30, 4 ] + * + * var bool = ( out === x ); + * // returns true + * + * @example + * var x = [ 1, 2, 3, 4 ]; + * + * var out = ns.put( x, [ 1, 2 ], [ 30 ], 'throw' ); + * // returns [ 1, 30, 30, 4 ] + * + * var bool = ( out === x ); + * // returns true + */ + put: typeof put; + /** * 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. *