Skip to content

Commit 341eb66

Browse files
committed
chore: add suggestions
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 2153a1f commit 341eb66

File tree

8 files changed

+120
-120
lines changed

8 files changed

+120
-120
lines changed

lib/node_modules/@stdlib/array/base/to-inserted-at/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818
1919
-->
2020

21-
# array2InsertedAt
21+
# toInsertedAt
2222

2323
> Return a new array with the element at the specified index inserted with a provided value.
2424
@@ -37,20 +37,20 @@ limitations under the License.
3737
## Usage
3838

3939
```javascript
40-
var array2InsertedAt = require( '@stdlib/array/base/to-inserted-at' );
40+
var toInsertedAt = require( '@stdlib/array/base/to-inserted-at' );
4141
```
4242

43-
#### array2InsertedAt( x, index, value )
43+
#### toInsertedAt( x, index, value )
4444

4545
Returns a new array with the element at the specified index inserted with a provided value.
4646

4747
```javascript
4848
var x = [ 1, 2, 3, 4 ];
4949

50-
var out = array2InsertedAt( x, 0, 5 );
50+
var out = toInsertedAt( x, 0, 5 );
5151
// returns [ 5, 1, 2, 3, 4 ]
5252

53-
out = array2InsertedAt( x, -1, 6 );
53+
out = toInsertedAt( x, -1, 6 );
5454
// returns [ 1, 2, 3, 6, 4 ]
5555
```
5656

@@ -60,15 +60,15 @@ The function accepts the following arguments:
6060
- **index**: element index.
6161
- **value**: inserting value.
6262

63-
### array2InsertedAt.assign( x, index, value, out, stride, offset )
63+
### toInsertedAt.assign( x, index, value, out, stride, offset )
6464

6565
Copies elements from one array to another array and sets the element at the specified index to a provided value.
6666

6767
```javascript
6868
var x = [ 1, 2, 3, 4 ];
6969

70-
var out = [ 0, 0, 0, 0 ];
71-
var arr = array2InsertedAt.assign( x, 0, 5, out, 1, 0 );
70+
var out = [ 0, 0, 0, 0, 0 ];
71+
var arr = toInsertedAt.assign( x, 0, 5, out, 1, 0 );
7272
// returns [ 5, 1, 2, 3, 4 ]
7373

7474
var bool = ( arr === out );
@@ -111,7 +111,7 @@ The function accepts the following arguments:
111111

112112
```javascript
113113
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
114-
var array2InsertedAt = require( '@stdlib/array/base/to-inserted-at' );
114+
var toInsertedAt = require( '@stdlib/array/base/to-inserted-at' );
115115

116116
// Define an array:
117117
var opts = {
@@ -128,7 +128,7 @@ var values = discreteUniform( indices.length, -10000, 10000, opts );
128128
// Randomly set elements in the input array:
129129
var i;
130130
for ( i = 0; i < indices.length; i++ ) {
131-
console.log( 'x = [%s]', array2InsertedAt( x, indices[ i ], values[ i ] ).join( ',' ) );
131+
console.log( 'x = [%s]', toInsertedAt( x, indices[ i ], values[ i ] ).join( ',' ) );
132132
}
133133
```
134134

lib/node_modules/@stdlib/array/base/to-inserted-at/benchmark/benchmark.assign.length.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var isArray = require( '@stdlib/assert/is-array' );
2626
var ones = require( '@stdlib/array/base/ones' );
2727
var zeros = require( '@stdlib/array/base/zeros' );
2828
var pkg = require( './../package.json' ).name;
29-
var array2InsertedAt = require( './../lib' );
29+
var toInsertedAt = require( './../lib' );
3030

3131

3232
// FUNCTIONS //
@@ -55,7 +55,7 @@ function createBenchmark( len ) {
5555

5656
b.tic();
5757
for ( i = 0; i < b.iterations; i++ ) {
58-
v = array2InsertedAt.assign( x, i%len, i, out, 1, 0 );
58+
v = toInsertedAt.assign( x, i%len, i, out, 1, 0 );
5959
if ( typeof v !== 'object' ) {
6060
b.fail( 'should return an array' );
6161
}

lib/node_modules/@stdlib/array/base/to-inserted-at/benchmark/benchmark.length.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var pow = require( '@stdlib/math/base/special/pow' );
2525
var isArray = require( '@stdlib/assert/is-array' );
2626
var ones = require( '@stdlib/array/base/ones' );
2727
var pkg = require( './../package.json' ).name;
28-
var array2InsertedAt = require( './../lib' );
28+
var toInsertedAt = require( './../lib' );
2929

3030

3131
// FUNCTIONS //
@@ -53,7 +53,7 @@ function createBenchmark( len ) {
5353

5454
b.tic();
5555
for ( i = 0; i < b.iterations; i++ ) {
56-
out = array2InsertedAt( x, i%len, i );
56+
out = toInsertedAt( x, i%len, i );
5757
if ( out.length !== len + 1 ) {
5858
b.fail( 'unexpected length' );
5959
}

lib/node_modules/@stdlib/array/base/to-inserted-at/docs/types/index.d.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { Collection, RealTypedArray, ComplexTypedArray, AccessorArrayLike } from
2424
import { ComplexLike } from '@stdlib/types/complex';
2525

2626
/**
27-
* Interface describing `array2InsertedAt`.
27+
* Interface describing `toInsertedAt`.
2828
*/
2929
interface Array2InsertedAt {
3030
/**
@@ -41,7 +41,7 @@ interface Array2InsertedAt {
4141
*
4242
* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
4343
*
44-
* var out = array2InsertedAt( x, 0, new Complex128( 7.0, 8.0 ) );
44+
* var out = toInsertedAt( x, 0, new Complex128( 7.0, 8.0 ) );
4545
* // returns <Complex128Array>[ 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]
4646
*/
4747
<T extends ComplexTypedArray>( x: T, index: number, value: ComplexLike ): T;
@@ -59,7 +59,7 @@ interface Array2InsertedAt {
5959
*
6060
* var x = new Float64Array( [ 1.0, 2.0, 3.0 ] );
6161
*
62-
* var out = array2InsertedAt( x, 0, 5.0 );
62+
* var out = toInsertedAt( x, 0, 5.0 );
6363
* // returns <Float64Array>[ 5.0, 1.0, 2.0, 3.0 ]
6464
*/
6565
<T extends RealTypedArray>( x: T, index: number, value: number ): T; // eslint-disable-line @typescript-eslint/unified-signatures
@@ -75,13 +75,13 @@ interface Array2InsertedAt {
7575
* @example
7676
* var x = [ 1, 2, 3 ];
7777
*
78-
* var out = array2InsertedAt( x, 0, 7 );
78+
* var out = toInsertedAt( x, 0, 7 );
7979
* // returns [ 7, 1, 2, 3 ]
8080
*
8181
* @example
8282
* var x = [ 1, 2, 3, 4, 5, 6 ];
8383
*
84-
* var out = array2InsertedAt( x, 1, 8 );
84+
* var out = toInsertedAt( x, 1, 8 );
8585
* // returns [ 1, 8, 2, 3, 4, 5, 6 ]
8686
*/
8787
<T = unknown>( x: Collection<T>, index: number, value: T ): Array<T>;
@@ -103,7 +103,7 @@ interface Array2InsertedAt {
103103
* var x = [ 1, 2, 3, 4 ];
104104
*
105105
* var out = new Float64Array( [ 0, 0, 0, 0, 0 ] );
106-
* var arr = array2InsertedAt.assign( x, 0, 5, out, 1, 0 );
106+
* var arr = toInsertedAt.assign( x, 0, 5, out, 1, 0 );
107107
* // returns <Float64Array>[ 5, 1, 2, 3, 4 ]
108108
*
109109
* var bool = ( arr === out );
@@ -129,7 +129,7 @@ interface Array2InsertedAt {
129129
* var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
130130
*
131131
* var out = new Complex128Array( 4 );
132-
* var arr = array2InsertedAt.assign( x, 0, new Complex128( 7.0, 8.0 ), out, 1, 0 );
132+
* var arr = toInsertedAt.assign( x, 0, new Complex128( 7.0, 8.0 ), out, 1, 0 );
133133
* // returns <Complex128Array>[ 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]
134134
*
135135
* var bool = ( arr === out );
@@ -152,7 +152,7 @@ interface Array2InsertedAt {
152152
* var x = [ 1, 2, 3, 4 ];
153153
*
154154
* var out = [ 0, 0, 0, 0, 0 ];
155-
* var arr = array2InsertedAt.assign( x, 0, 5, out, 1, 0 );
155+
* var arr = toInsertedAt.assign( x, 0, 5, out, 1, 0 );
156156
* // returns [ 5, 1, 2, 3, 4 ]
157157
*
158158
* var bool = ( arr === out );
@@ -177,7 +177,7 @@ interface Array2InsertedAt {
177177
* var x = toAccessorArray( [ 1, 2, 3, 4 ] );
178178
*
179179
* var out = toAccessorArray( [ 0, 0, 0, 0, 0 ] );
180-
* var arr = array2InsertedAt.assign( x, 0, 5, out, 1, 0 );
180+
* var arr = toInsertedAt.assign( x, 0, 5, out, 1, 0 );
181181
*
182182
* var v = out[ 0 ];
183183
* // returns 5
@@ -202,7 +202,7 @@ interface Array2InsertedAt {
202202
* var x = [ 1, 2, 3, 4 ];
203203
*
204204
* var out = [ 0, 0, 0, 0, 0 ];
205-
* var arr = array2InsertedAt.assign( x, 0, 5, out, 1, 0 );
205+
* var arr = toInsertedAt.assign( x, 0, 5, out, 1, 0 );
206206
* // returns [ 5, 1, 2, 3, 4 ]
207207
*
208208
* var bool = ( arr === out );
@@ -222,13 +222,13 @@ interface Array2InsertedAt {
222222
* @example
223223
* var x = [ 1, 2, 3 ];
224224
*
225-
* var out = array2InsertedAt( x, 0, 7 );
225+
* var out = toInsertedAt( x, 0, 7 );
226226
* // returns [ 7, 1, 2, 3 ]
227227
*
228228
* @example
229229
* var x = [ 1, 2, 3, 4, 5, 6 ];
230230
*
231-
* var out = array2InsertedAt( x, 1, 8 );
231+
* var out = toInsertedAt( x, 1, 8 );
232232
* // returns [ 1, 8, 2, 3, 4, 5, 6 ]
233233
*
234234
* @example
@@ -237,15 +237,15 @@ interface Array2InsertedAt {
237237
* var x = [ 1, 2, 3, 4 ];
238238
*
239239
* var out = new Float64Array( [ 0, 0, 0, 0, 0 ] );
240-
* var arr = array2InsertedAt.assign( x, 0, 5, out, 1, 0 );
240+
* var arr = toInsertedAt.assign( x, 0, 5, out, 1, 0 );
241241
* // returns <Float64Array>[ 5, 1, 2, 3, 4 ]
242242
*
243243
* var bool = ( arr === out );
244244
* // returns true
245245
*/
246-
declare var array2InsertedAt: Array2InsertedAt;
246+
declare var toInsertedAt: Array2InsertedAt;
247247

248248

249249
// EXPORTS //
250250

251-
export = array2InsertedAt;
251+
export = toInsertedAt;

0 commit comments

Comments
 (0)