You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1082,6 +1083,7 @@ This release closes the following issue:
1082
1083
1083
1084
##### Features
1084
1085
1086
+
-[`b68b283`](https://github.com/stdlib-js/stdlib/commit/b68b28358b19ba7e4d23d9a87acfb283c3c0ea3d) - add specialized support for complex number and boolean arrays
@@ -1206,6 +1208,7 @@ This release closes the following issue:
1206
1208
1207
1209
##### Features
1208
1210
1211
+
-[`74d2527`](https://github.com/stdlib-js/stdlib/commit/74d2527745106957e4b6228975dceb3578adcc5a) - add specialized support for complex number and boolean arrays
-[`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)_
1905
1916
-[`e8bb580`](https://github.com/stdlib-js/stdlib/commit/e8bb580f445dcbeeb03e458def428d9e820ab808) - **feat:** add `lastIndexOfSameValue` to namespace _(by Athan Reines)_
* @param equalNaNs - boolean indicating whether NaNs should be considered equal
2835
2836
* @returns index
2836
2837
*
2837
2838
* @example
2838
2839
* var x = [ 1, 2, 3, 4 ];
2839
2840
*
2840
-
* var idx = ns.indexOf( x, 2, 0, false );
2841
+
* var idx = ns.indexOf( x, 2, 0 );
2841
2842
* // returns 1
2842
2843
*
2843
2844
* @example
2844
2845
* var Int32Array = require( '@stdlib/array-int32' );
2845
2846
*
2846
2847
* var x = new Int32Array( [ 1, 2, 3, 4 ] );
2847
2848
*
2848
-
* var idx = ns.indexOf( x, 2, 0, false );
2849
+
* var idx = ns.indexOf( x, 2, 0 );
2849
2850
* // returns 1
2850
2851
*/
2851
2852
indexOf: typeofindexOf;
2852
2853
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: typeofindexOfSameValue;
2882
+
2853
2883
/**
2854
2884
* Returns the complement of a list of array indices.
2855
2885
*
@@ -2926,25 +2956,54 @@ interface Namespace {
2926
2956
* @param x - input array
2927
2957
* @param searchElement - search element
2928
2958
* @param fromIndex - starting index (inclusive)
2929
-
* @param equalNaNs - boolean indicating whether NaNs should be considered equal
2930
2959
* @returns index
2931
2960
*
2932
2961
* @example
2933
2962
* var x = [ 1, 2, 3, 4 ];
2934
2963
*
2935
-
* var idx = ns.lastIndexOf( x, 2, 3, false );
2964
+
* var idx = ns.lastIndexOf( x, 2, 3 );
2936
2965
* // returns 1
2937
2966
*
2938
2967
* @example
2939
2968
* var Int32Array = require( '@stdlib/array-int32' );
2940
2969
*
2941
2970
* var x = new Int32Array( [ 1, 2, 3, 4 ] );
2942
2971
*
2943
-
* var idx = ns.lastIndexOf( x, 2, 3, false );
2972
+
* var idx = ns.lastIndexOf( x, 2, 3 );
2944
2973
* // returns 1
2945
2974
*/
2946
2975
lastIndexOf: typeoflastIndexOf;
2947
2976
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' );
0 commit comments