@@ -85,6 +85,7 @@ import everyByRight = require( './../../../base/every-by-right' );
85
85
import fancySlice = require( './../../../base/fancy-slice' ) ;
86
86
import fancySliceAssign = require( './../../../base/fancy-slice-assign' ) ;
87
87
import fill = require( './../../../base/fill' ) ;
88
+ import fillBy = require( './../../../base/fill-by' ) ;
88
89
import filled = require( './../../../base/filled' ) ;
89
90
import filledBy = require( './../../../base/filled-by' ) ;
90
91
import filled2d = require( './../../../base/filled2d' ) ;
@@ -1947,6 +1948,38 @@ interface Namespace {
1947
1948
*/
1948
1949
fill : typeof fill ;
1949
1950
1951
+ /**
1952
+ * Fills all elements within a portion of an array according to a provided callback function.
1953
+ *
1954
+ * @param x - input array
1955
+ * @param start - starting index (inclusive)
1956
+ * @param end - ending index (exclusive)
1957
+ * @param fcn - callback function
1958
+ * @param thisArg - callback function execution context
1959
+ * @returns modified input array
1960
+ *
1961
+ * @example
1962
+ * function fcn() {
1963
+ * return 4;
1964
+ * }
1965
+ *
1966
+ * var x = [ 1, 2, 3 ];
1967
+ *
1968
+ * var out = ns.fillBy( x, 4, 0, 3 );
1969
+ * // returns [ 4, 4, 4 ]
1970
+ *
1971
+ * @example
1972
+ * function fcn() {
1973
+ * return 8;
1974
+ * }
1975
+ *
1976
+ * var x = [ 1, 2, 3, 4, 5, 6 ];
1977
+ *
1978
+ * var out = ns.fillBy( x, 8, 0, 3 );
1979
+ * // returns [ 8, 8, 8, 4, 5, 6 ]
1980
+ */
1981
+ fillBy : typeof fillBy ;
1982
+
1950
1983
/**
1951
1984
* Returns a filled "generic" array.
1952
1985
*
0 commit comments