Skip to content

Commit d7691e3

Browse files
committed
Auto-generated commit
1 parent 52d5bc6 commit d7691e3

File tree

2 files changed

+76
-6
lines changed

2 files changed

+76
-6
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
##### Features
2222

23+
- [`7899d23`](https://github.com/stdlib-js/stdlib/commit/7899d23195464e9fc0a10b1f0e57b5aa230de5e2) - update namespace TypeScript declarations [(#6459)](https://github.com/stdlib-js/stdlib/pull/6459)
2324
- [`e8bb580`](https://github.com/stdlib-js/stdlib/commit/e8bb580f445dcbeeb03e458def428d9e820ab808) - add `lastIndexOfSameValue` to namespace
2425
- [`e8a96a1`](https://github.com/stdlib-js/stdlib/commit/e8a96a17652f957f69c041a2f7292bee1b827aeb) - add `indexOfSameValue` to namespace
2526
- [`4623339`](https://github.com/stdlib-js/stdlib/commit/46233390b61053807a2b8ce901c1f03974bd04f9) - update namespace TypeScript declarations [(#6275)](https://github.com/stdlib-js/stdlib/pull/6275)
@@ -1082,6 +1083,7 @@ This release closes the following issue:
10821083

10831084
##### Features
10841085

1086+
- [`b68b283`](https://github.com/stdlib-js/stdlib/commit/b68b28358b19ba7e4d23d9a87acfb283c3c0ea3d) - add specialized support for complex number and boolean arrays
10851087
- [`c7f571e`](https://github.com/stdlib-js/stdlib/commit/c7f571ef00c124a120847f0c8fa59053c7c27dba) - add `array/base/index-of-same-value`
10861088

10871089
</section>
@@ -1206,6 +1208,7 @@ This release closes the following issue:
12061208

12071209
##### Features
12081210

1211+
- [`74d2527`](https://github.com/stdlib-js/stdlib/commit/74d2527745106957e4b6228975dceb3578adcc5a) - add specialized support for complex number and boolean arrays
12091212
- [`25fd7dd`](https://github.com/stdlib-js/stdlib/commit/25fd7dd71923e473865bb8c814fdef3981b17593) - add `array/base/last-index-of-same-value`
12101213

12111214
</section>
@@ -1902,6 +1905,14 @@ A total of 15 people contributed to this release. Thank you to the following con
19021905

19031906
<details>
19041907

1908+
- [`7899d23`](https://github.com/stdlib-js/stdlib/commit/7899d23195464e9fc0a10b1f0e57b5aa230de5e2) - **feat:** update namespace TypeScript declarations [(#6459)](https://github.com/stdlib-js/stdlib/pull/6459) _(by stdlib-bot)_
1909+
- [`74d2527`](https://github.com/stdlib-js/stdlib/commit/74d2527745106957e4b6228975dceb3578adcc5a) - **feat:** add specialized support for complex number and boolean arrays _(by Athan Reines)_
1910+
- [`b27b960`](https://github.com/stdlib-js/stdlib/commit/b27b96086d569c9b6c99f7a5f2a24d74c8d41618) - **test:** add test cases _(by Athan Reines)_
1911+
- [`f57b1c2`](https://github.com/stdlib-js/stdlib/commit/f57b1c262867fcaa6dc94b1ce64ab36c619b91a8) - **refactor:** reduce overhead by using specialized utilities _(by Athan Reines)_
1912+
- [`534ddc0`](https://github.com/stdlib-js/stdlib/commit/534ddc015151231e4c9d5e9447b0a8966295876d) - **refactor:** reduce overhead by using specialized utilities _(by Athan Reines)_
1913+
- [`91c33f0`](https://github.com/stdlib-js/stdlib/commit/91c33f0eeb8bade27b26671a5280a7ec9758a688) - **refactor:** reduce overhead by using specialized utilities _(by Athan Reines)_
1914+
- [`c7f060f`](https://github.com/stdlib-js/stdlib/commit/c7f060f6549d45a4c7faa06b25ff55a882ee6299) - **test:** add test cases _(by Athan Reines)_
1915+
- [`b68b283`](https://github.com/stdlib-js/stdlib/commit/b68b28358b19ba7e4d23d9a87acfb283c3c0ea3d) - **feat:** add specialized support for complex number and boolean arrays _(by Athan Reines)_
19051916
- [`e8bb580`](https://github.com/stdlib-js/stdlib/commit/e8bb580f445dcbeeb03e458def428d9e820ab808) - **feat:** add `lastIndexOfSameValue` to namespace _(by Athan Reines)_
19061917
- [`25fd7dd`](https://github.com/stdlib-js/stdlib/commit/25fd7dd71923e473865bb8c814fdef3981b17593) - **feat:** add `array/base/last-index-of-same-value` _(by Athan Reines)_
19071918
- [`e8a96a1`](https://github.com/stdlib-js/stdlib/commit/e8a96a17652f957f69c041a2f7292bee1b827aeb) - **feat:** add `indexOfSameValue` to namespace _(by Athan Reines)_

docs/types/index.d.ts

Lines changed: 65 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,12 @@ import groupValues = require( '@stdlib/array-base-group-values' );
128128
import groupValuesBy = require( '@stdlib/array-base-group-values-by' );
129129
import incrspace = require( '@stdlib/array-base-incrspace' );
130130
import indexOf = require( '@stdlib/array-base-index-of' );
131+
import indexOfSameValue = require( '@stdlib/array-base-index-of-same-value' );
131132
import indicesComplement = require( '@stdlib/array-base-indices-complement' );
132133
import join = require( '@stdlib/array-base-join' );
133134
import last = require( '@stdlib/array-base-last' );
134135
import lastIndexOf = require( '@stdlib/array-base-last-index-of' );
136+
import lastIndexOfSameValue = require( '@stdlib/array-base-last-index-of-same-value' );
135137
import linspace = require( '@stdlib/array-base-linspace' );
136138
import logspace = require( '@stdlib/array-base-logspace' );
137139
import map2d = require( '@stdlib/array-base-map2d' );
@@ -2831,25 +2833,53 @@ interface Namespace {
28312833
* @param x - input array
28322834
* @param searchElement - search element
28332835
* @param fromIndex - starting index (inclusive)
2834-
* @param equalNaNs - boolean indicating whether NaNs should be considered equal
28352836
* @returns index
28362837
*
28372838
* @example
28382839
* var x = [ 1, 2, 3, 4 ];
28392840
*
2840-
* var idx = ns.indexOf( x, 2, 0, false );
2841+
* var idx = ns.indexOf( x, 2, 0 );
28412842
* // returns 1
28422843
*
28432844
* @example
28442845
* var Int32Array = require( '@stdlib/array-int32' );
28452846
*
28462847
* var x = new Int32Array( [ 1, 2, 3, 4 ] );
28472848
*
2848-
* var idx = ns.indexOf( x, 2, 0, false );
2849+
* var idx = ns.indexOf( x, 2, 0 );
28492850
* // returns 1
28502851
*/
28512852
indexOf: typeof indexOf;
28522853

2854+
/**
2855+
* Returns the index of the first element which equals a provided search element according to the same value algorithm.
2856+
*
2857+
* ## Notes
2858+
*
2859+
* - If unable to find an element which equals a provided search element, the function returns `-1`.
2860+
* - 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`.
2861+
*
2862+
* @param x - input array
2863+
* @param searchElement - search element
2864+
* @param fromIndex - starting index (inclusive)
2865+
* @returns index
2866+
*
2867+
* @example
2868+
* var x = [ 1, 2, 3, 4 ];
2869+
*
2870+
* var idx = ns.indexOfSameValue( x, 2, 0 );
2871+
* // returns 1
2872+
*
2873+
* @example
2874+
* var Int32Array = require( '@stdlib/array-int32' );
2875+
*
2876+
* var x = new Int32Array( [ 1, 2, 3, 4 ] );
2877+
*
2878+
* var idx = ns.indexOfSameValue( x, 2, 0 );
2879+
* // returns 1
2880+
*/
2881+
indexOfSameValue: typeof indexOfSameValue;
2882+
28532883
/**
28542884
* Returns the complement of a list of array indices.
28552885
*
@@ -2926,25 +2956,54 @@ interface Namespace {
29262956
* @param x - input array
29272957
* @param searchElement - search element
29282958
* @param fromIndex - starting index (inclusive)
2929-
* @param equalNaNs - boolean indicating whether NaNs should be considered equal
29302959
* @returns index
29312960
*
29322961
* @example
29332962
* var x = [ 1, 2, 3, 4 ];
29342963
*
2935-
* var idx = ns.lastIndexOf( x, 2, 3, false );
2964+
* var idx = ns.lastIndexOf( x, 2, 3 );
29362965
* // returns 1
29372966
*
29382967
* @example
29392968
* var Int32Array = require( '@stdlib/array-int32' );
29402969
*
29412970
* var x = new Int32Array( [ 1, 2, 3, 4 ] );
29422971
*
2943-
* var idx = ns.lastIndexOf( x, 2, 3, false );
2972+
* var idx = ns.lastIndexOf( x, 2, 3 );
29442973
* // returns 1
29452974
*/
29462975
lastIndexOf: typeof lastIndexOf;
29472976

2977+
/**
2978+
* Returns the index of the last element which equals a provided search element according to the same value algorithm.
2979+
*
2980+
* ## Notes
2981+
*
2982+
* - The function scans an input array from the starting index to the beginning of the array (i.e., backward).
2983+
* - If unable to find an element which equals a provided search element, the function returns `-1`.
2984+
* - 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`.
2985+
*
2986+
* @param x - input array
2987+
* @param searchElement - search element
2988+
* @param fromIndex - starting index (inclusive)
2989+
* @returns index
2990+
*
2991+
* @example
2992+
* var x = [ 1, 2, 3, 4 ];
2993+
*
2994+
* var idx = ns.lastIndexOfSameValue( x, 2, 3 );
2995+
* // returns 1
2996+
*
2997+
* @example
2998+
* var Int32Array = require( '@stdlib/array-int32' );
2999+
*
3000+
* var x = new Int32Array( [ 1, 2, 3, 4 ] );
3001+
*
3002+
* var idx = ns.lastIndexOfSameValue( x, 2, 3 );
3003+
* // returns 1
3004+
*/
3005+
lastIndexOfSameValue: typeof lastIndexOfSameValue;
3006+
29483007
/**
29493008
* Generates a linearly spaced numeric array.
29503009
*

0 commit comments

Comments
 (0)