File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 7
7
that wraps the original function object.
8
8
*/
9
9
10
- Function . prototype . altBind = function ( someObj , ...outerFuncArguments1 ) {
10
+ Function . prototype . altBind = function ( someObj , ...outerFuncArguments ) {
11
11
const targetFunc = this ;
12
12
13
13
// return inner function
14
- return function ( ...innerFuncArgs1 ) {
14
+ return function ( ...innerFuncArgs ) {
15
15
16
16
let propKey = Math . random ( ) . toString ( ) ;
17
17
while ( someObj . hasOwnProperty ( propKey ) ) {
@@ -20,8 +20,8 @@ Function.prototype.altBind = function (someObj, ...outerFuncArguments1) {
20
20
someObj [ propKey ] = targetFunc ;
21
21
22
22
// prepend outer args to inner args
23
- const result = someObj [ propKey ] ( ...outerFuncArguments1 , ...innerFuncArgs1 ) ;
23
+ const result = someObj [ propKey ] ( ...outerFuncArguments , ...innerFuncArgs ) ;
24
24
delete someObj [ propKey ] ;
25
25
return result ;
26
- }
27
- }
26
+ } ;
27
+ } ;
You can’t perform that action at this time.
0 commit comments