(/* ...args */)
| 103 | , REFERENCE_GET; |
| 104 | // Partial apply |
| 105 | function part(/* ...args */){ |
| 106 | var fn = assertFunction(this) |
| 107 | , length = arguments.length |
| 108 | , args = Array(length) |
| 109 | , i = 0 |
| 110 | , _ = path._ |
| 111 | , holder = false; |
| 112 | while(length > i)if((args[i] = arguments[i++]) === _)holder = true; |
| 113 | return function(/* ...args */){ |
| 114 | var that = this |
| 115 | , _length = arguments.length |
| 116 | , i = 0, j = 0, _args; |
| 117 | if(!holder && !_length)return invoke(fn, args, that); |
| 118 | _args = args.slice(); |
| 119 | if(holder)for(;length > i; i++)if(_args[i] === _)_args[i] = arguments[j++]; |
| 120 | while(_length > j)_args.push(arguments[j++]); |
| 121 | return invoke(fn, _args, that); |
| 122 | } |
| 123 | } |
| 124 | // Optional / simple context binding |
| 125 | function ctx(fn, that, length){ |
| 126 | assertFunction(fn); |
nothing calls this directly
no test coverage detected