Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 65 additions & 6 deletions lib/node_modules/@stdlib/array/base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down Expand Up @@ -2831,25 +2833,53 @@ 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
* var Int32Array = require( '@stdlib/array/int32' );
*
* 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.
*
Expand Down Expand Up @@ -2926,25 +2956,54 @@ 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
* var Int32Array = require( '@stdlib/array/int32' );
*
* 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.
*
Expand Down
8 changes: 4 additions & 4 deletions lib/node_modules/@stdlib/assert/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down