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 f7ed405df926..331ddf50589e 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 @@ -128,10 +128,12 @@ import groupValues = require( '@stdlib/array/base/group-values' ); import groupValuesBy = require( '@stdlib/array/base/group-values-by' ); import incrspace = require( '@stdlib/array/base/incrspace' ); import indexOf = require( '@stdlib/array/base/index-of' ); +import indexOfSameValue = require( '@stdlib/array/base/index-of-same-value' ); import indicesComplement = require( '@stdlib/array/base/indices-complement' ); import join = require( '@stdlib/array/base/join' ); import last = require( '@stdlib/array/base/last' ); import lastIndexOf = require( '@stdlib/array/base/last-index-of' ); +import lastIndexOfSameValue = require( '@stdlib/array/base/last-index-of-same-value' ); import linspace = require( '@stdlib/array/base/linspace' ); import logspace = require( '@stdlib/array/base/logspace' ); import map2d = require( '@stdlib/array/base/map2d' ); @@ -2831,13 +2833,12 @@ interface Namespace { * @param x - input array * @param searchElement - search element * @param fromIndex - starting index (inclusive) - * @param equalNaNs - boolean indicating whether NaNs should be considered equal * @returns index * * @example * var x = [ 1, 2, 3, 4 ]; * - * var idx = ns.indexOf( x, 2, 0, false ); + * var idx = ns.indexOf( x, 2, 0 ); * // returns 1 * * @example @@ -2845,11 +2846,40 @@ interface Namespace { * * var x = new Int32Array( [ 1, 2, 3, 4 ] ); * - * var idx = ns.indexOf( x, 2, 0, false ); + * var idx = ns.indexOf( x, 2, 0 ); * // returns 1 */ indexOf: typeof indexOf; + /** + * Returns the index of the first element which equals a provided search element according to the same value algorithm. + * + * ## Notes + * + * - If unable to find an element which equals a provided search element, the function returns `-1`. + * - If `fromIndex` is less than zero, the starting index is resolved relative to the last array element, with the last array element corresponding to `fromIndex = -1`. + * + * @param x - input array + * @param searchElement - search element + * @param fromIndex - starting index (inclusive) + * @returns index + * + * @example + * var x = [ 1, 2, 3, 4 ]; + * + * var idx = ns.indexOfSameValue( x, 2, 0 ); + * // returns 1 + * + * @example + * var Int32Array = require( '@stdlib/array/int32' ); + * + * var x = new Int32Array( [ 1, 2, 3, 4 ] ); + * + * var idx = ns.indexOfSameValue( x, 2, 0 ); + * // returns 1 + */ + indexOfSameValue: typeof indexOfSameValue; + /** * Returns the complement of a list of array indices. * @@ -2926,13 +2956,12 @@ interface Namespace { * @param x - input array * @param searchElement - search element * @param fromIndex - starting index (inclusive) - * @param equalNaNs - boolean indicating whether NaNs should be considered equal * @returns index * * @example * var x = [ 1, 2, 3, 4 ]; * - * var idx = ns.lastIndexOf( x, 2, 3, false ); + * var idx = ns.lastIndexOf( x, 2, 3 ); * // returns 1 * * @example @@ -2940,11 +2969,41 @@ interface Namespace { * * var x = new Int32Array( [ 1, 2, 3, 4 ] ); * - * var idx = ns.lastIndexOf( x, 2, 3, false ); + * var idx = ns.lastIndexOf( x, 2, 3 ); * // returns 1 */ lastIndexOf: typeof lastIndexOf; + /** + * Returns the index of the last element which equals a provided search element according to the same value algorithm. + * + * ## Notes + * + * - The function scans an input array from the starting index to the beginning of the array (i.e., backward). + * - If unable to find an element which equals a provided search element, the function returns `-1`. + * - If `fromIndex` is less than zero, the starting index is resolved relative to the last array element, with the last array element corresponding to `fromIndex = -1`. + * + * @param x - input array + * @param searchElement - search element + * @param fromIndex - starting index (inclusive) + * @returns index + * + * @example + * var x = [ 1, 2, 3, 4 ]; + * + * var idx = ns.lastIndexOfSameValue( x, 2, 3 ); + * // returns 1 + * + * @example + * var Int32Array = require( '@stdlib/array/int32' ); + * + * var x = new Int32Array( [ 1, 2, 3, 4 ] ); + * + * var idx = ns.lastIndexOfSameValue( x, 2, 3 ); + * // returns 1 + */ + lastIndexOfSameValue: typeof lastIndexOfSameValue; + /** * Generates a linearly spaced numeric array. * diff --git a/lib/node_modules/@stdlib/assert/docs/types/index.d.ts b/lib/node_modules/@stdlib/assert/docs/types/index.d.ts index d78919294f58..d0f66bdcc582 100644 --- a/lib/node_modules/@stdlib/assert/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/assert/docs/types/index.d.ts @@ -329,13 +329,13 @@ interface Namespace { * * ## Notes * - * - When `val` is a string, the function checks whether the characters of the search string are found in the input string. The search is case-sensitive. - * - When `val` is an array-like object, the function checks whether the input array contains an element strictly equal to the specified search value. + * - When `value` is a string, the function checks whether the characters of the search string are found in the input string. The search is case-sensitive. + * - When `value` is an array-like object, the function checks whether the input array contains an element which is the same as the specified search value. * - For strings, this function is modeled after `String.prototype.includes`, part of the ECMAScript 6 specification. This function is different from a call to `String.prototype.includes.call` insofar as type-checking is performed for all arguments. - * - The function does not distinguish between positive and negative zero. + * - The function does distinguish between positive and negative zero. * - If `position < 0`, the search is performed for the entire input array or string. * - * @param val - input value + * @param value - input value * @param searchValue - search value * @param position - position at which to start searching for `searchValue` (default: 0) * @throws second argument must be a primitive string primitive when the first argument is a string