Skip to content

Commit eeacc04

Browse files
committed
Auto-generated commit
1 parent faf3573 commit eeacc04

7 files changed

Lines changed: 91 additions & 8 deletions

File tree

‎.github/.keepalive‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎CHANGELOG.md‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,25 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2026-10-05)
7+
## Unreleased (2026-10-12)
8+
9+
<section class="bug-fixes">
10+
11+
### Bug Fixes
12+
13+
- [`ed03196`](https://github.com/stdlib-js/stdlib/commit/ed031969ed59525f9ce7418f9375a26fb70a4a89) - ensure valid indexing of arguments array [(#15922)](https://github.com/stdlib-js/stdlib/pull/15922)
14+
15+
</section>
16+
17+
<!-- /.bug-fixes -->
818

919
<section class="issues">
1020

1121
### Closed Issues
1222

13-
A total of 9 issues were closed in this release:
23+
A total of 10 issues were closed in this release:
1424

15-
[#11209](https://github.com/stdlib-js/stdlib/issues/11209), [#12434](https://github.com/stdlib-js/stdlib/issues/12434), [#12859](https://github.com/stdlib-js/stdlib/issues/12859), [#12977](https://github.com/stdlib-js/stdlib/issues/12977), [#13224](https://github.com/stdlib-js/stdlib/issues/13224), [#13366](https://github.com/stdlib-js/stdlib/issues/13366), [#13763](https://github.com/stdlib-js/stdlib/issues/13763), [#14273](https://github.com/stdlib-js/stdlib/issues/14273), [#15438](https://github.com/stdlib-js/stdlib/issues/15438)
25+
[#11209](https://github.com/stdlib-js/stdlib/issues/11209), [#12434](https://github.com/stdlib-js/stdlib/issues/12434), [#12859](https://github.com/stdlib-js/stdlib/issues/12859), [#12977](https://github.com/stdlib-js/stdlib/issues/12977), [#13224](https://github.com/stdlib-js/stdlib/issues/13224), [#13366](https://github.com/stdlib-js/stdlib/issues/13366), [#13763](https://github.com/stdlib-js/stdlib/issues/13763), [#14273](https://github.com/stdlib-js/stdlib/issues/14273), [#15438](https://github.com/stdlib-js/stdlib/issues/15438), [#15921](https://github.com/stdlib-js/stdlib/issues/15921)
1626

1727
</section>
1828

@@ -24,6 +34,7 @@ A total of 9 issues were closed in this release:
2434

2535
<details>
2636

37+
- [`ed03196`](https://github.com/stdlib-js/stdlib/commit/ed031969ed59525f9ce7418f9375a26fb70a4a89) - **fix:** ensure valid indexing of arguments array [(#15922)](https://github.com/stdlib-js/stdlib/pull/15922) _(by Manit Roy)_
2738
- [`08e741b`](https://github.com/stdlib-js/stdlib/commit/08e741bd1ce2c024ae86309676d1c0c3cd895c26) - **chore:** fix JavaScript lint errors [(#15439)](https://github.com/stdlib-js/stdlib/pull/15439) _(by MeowdyAGENT, Athan Reines)_
2839
- [`72b23ea`](https://github.com/stdlib-js/stdlib/commit/72b23ea594cad1265cd358ade0e366d682f5858d) - **chore:** clean-up [(#14383)](https://github.com/stdlib-js/stdlib/pull/14383) _(by Philipp Burckhardt)_
2940
- [`6a94f93`](https://github.com/stdlib-js/stdlib/commit/6a94f931962e3a3f227cbc6944f111794f333ce6) - **chore:** fix JavaScript lint errors [(#14286)](https://github.com/stdlib-js/stdlib/pull/14286) _(by Parth Kumbhar, Athan Reines)_
@@ -52,12 +63,13 @@ A total of 9 issues were closed in this release:
5263

5364
### Contributors
5465

55-
A total of 11 people contributed to this release. Thank you to the following contributors:
66+
A total of 12 people contributed to this release. Thank you to the following contributors:
5667

5768
- Andrey Rodrigues
5869
- Athan Reines
5970
- Jean Carlos Vargas
6071
- Krishna Sharma
72+
- Manit Roy
6173
- MeowdyAGENT
6274
- Nikan Eidi
6375
- Parth Kumbhar

‎CONTRIBUTORS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
159159
Pranav Goswami <pranavchiku11@gmail.com>
160160
pranav-1720 <123018993+pranav-1720@users.noreply.github.com>
161161
Pranjal Jha <97080887+PraneGIT@users.noreply.github.com>
162-
Prashant Kumar Yadav <144602492+0PrashantYadav0@users.noreply.github.com>
162+
Prashant Kumar Yadav <devprashantkyadav@gmail.com>
163163
PrathamBhamare <164445568+PrathamBhamare@users.noreply.github.com>
164164
Pratik Singh <97464067+Pratik772846@users.noreply.github.com>
165165
Pratyush Kumar Chouhan <pratyushkumar0308@gmail.com>

‎mask-arguments/lib/main.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function maskArguments( fcn, mask, thisArg ) {
148148
var i;
149149

150150
args = [];
151-
for ( i = 0; i < arguments.length; i++ ) {
151+
for ( i = 0; i < idx.length; i++ ) {
152152
args.push( arguments[ idx[i] ] );
153153
}
154154
return fcn.apply( thisArg, args );

‎mask-arguments/test/test.js‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,42 @@ tape( 'the returned function invokes a function according to an argument mask (n
234234
}
235235
});
236236

237+
tape( 'the returned function only forwards the masked-in arguments when called with more arguments than mask entries (nary)', function test( t ) {
238+
var bar = maskArguments( foo, [ 1, 1, 1, 1, 1, 1 ] );
239+
240+
t.deepEqual( bar( 1, 2, 3, 4, 5, 6, 7, 8 ), [ 6, 1, 2, 3, 4, 5, 6 ], 'returns expected value' );
241+
t.end();
242+
243+
function foo() {
244+
var args;
245+
var i;
246+
247+
args = [ arguments.length ];
248+
for ( i = 0; i < arguments.length; i++ ) {
249+
args.push( arguments[ i ] );
250+
}
251+
return args;
252+
}
253+
});
254+
255+
tape( 'the returned function forwards the masked-in arguments when called with fewer arguments than mask entries (nary)', function test( t ) {
256+
var bar = maskArguments( foo, [ 1, 1, 1, 1, 1, 1 ] );
257+
258+
t.deepEqual( bar( 1, 2, 3 ), [ 6, 1, 2, 3, void 0, void 0, void 0 ], 'returns expected value' );
259+
t.end();
260+
261+
function foo() {
262+
var args;
263+
var i;
264+
265+
args = [ arguments.length ];
266+
for ( i = 0; i < arguments.length; i++ ) {
267+
args.push( arguments[ i ] );
268+
}
269+
return args;
270+
}
271+
});
272+
237273
tape( 'the function supports providing a `this` context', function test( t ) {
238274
var ctx;
239275
var bar;

‎pick-arguments/lib/main.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function pickArguments( fcn, indices, thisArg ) {
148148
var i;
149149

150150
args = [];
151-
for ( i = 0; i < arguments.length; i++ ) {
151+
for ( i = 0; i < idx.length; i++ ) {
152152
args.push( arguments[ idx[i] ] );
153153
}
154154
return fcn.apply( thisArg, args );

‎pick-arguments/test/test.js‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,42 @@ tape( 'the returned function invokes a function with specified arguments (nary)'
236236
}
237237
});
238238

239+
tape( 'the returned function only forwards the specified number of arguments when called with more arguments than indices (nary)', function test( t ) {
240+
var bar = pickArguments( foo, [ 0, 1, 2, 3, 4, 5 ] );
241+
242+
t.deepEqual( bar( 1, 2, 3, 4, 5, 6, 7, 8 ), [ 6, 1, 2, 3, 4, 5, 6 ], 'returns expected value' );
243+
t.end();
244+
245+
function foo() {
246+
var args;
247+
var i;
248+
249+
args = [ arguments.length ];
250+
for ( i = 0; i < arguments.length; i++ ) {
251+
args.push( arguments[ i ] );
252+
}
253+
return args;
254+
}
255+
});
256+
257+
tape( 'the returned function forwards the specified number of arguments when called with fewer arguments than indices (nary)', function test( t ) {
258+
var bar = pickArguments( foo, [ 0, 1, 2, 3, 4, 5 ] );
259+
260+
t.deepEqual( bar( 1, 2, 3 ), [ 6, 1, 2, 3, void 0, void 0, void 0 ], 'returns expected value' );
261+
t.end();
262+
263+
function foo() {
264+
var args;
265+
var i;
266+
267+
args = [ arguments.length ];
268+
for ( i = 0; i < arguments.length; i++ ) {
269+
args.push( arguments[ i ] );
270+
}
271+
return args;
272+
}
273+
});
274+
239275
tape( 'the function supports providing a `this` context', function test( t ) {
240276
var ctx;
241277
var bar;

0 commit comments

Comments
 (0)