Skip to content
Merged
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
30 changes: 30 additions & 0 deletions lib/node_modules/@stdlib/array/base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ import ternary4d = require( '@stdlib/array/base/ternary4d' );
import ternary5d = require( '@stdlib/array/base/ternary5d' );
import toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
import toDeduped = require( '@stdlib/array/base/to-deduped' );
import toFilled = require( '@stdlib/array/base/to-filled' );
import toInsertedAt = require( '@stdlib/array/base/to-inserted-at' );
import toReversed = require( '@stdlib/array/base/to-reversed' );
import trues = require( '@stdlib/array/base/trues' );
Expand Down Expand Up @@ -5668,6 +5669,35 @@ interface Namespace {
*/
toDeduped: typeof toDeduped;

/**
* Returns a new array with all elements within a specified range replaced with a provided value.
*
* @param x - input array
* @param value - fill value
* @param start - starting index (inclusive)
* @param end - ending index (exclusive)
* @returns output array
*
* @example
* var x = [ 1, 2, 3, 4 ];
*
* var out = ns.toFilled( x, 5, 1, 3 );
* // returns [ 1, 5, 5, 4 ]
*
* @example
* var Float64Array = require( '@stdlib/array/float64' );
*
* var x = [ 1, 2, 3, 4 ];
*
* var out = new Float64Array( [ 0, 0, 0, 0 ] );
* var arr = ns.toFilled.assign( x, 5, 1, 3, out, 1, 0 );
* // returns <Float64Array>[ 1, 5, 5, 4 ]
*
* var bool = ( arr === out );
* // returns true
*/
toFilled: typeof toFilled;

/**
* Returns a new array containing every element from an input array and with a provided value inserted at a specified index.
*
Expand Down
Loading