({ length })
| 172 | } |
| 173 | |
| 174 | function inferParameters({ length }) { |
| 175 | if (!Number.isInteger(length) || length < 0) { |
| 176 | throw new TypeError('Expected function.length to be a positive integer'); |
| 177 | } |
| 178 | const params = []; |
| 179 | for (let i = 0; i < length; ++i) { |
| 180 | params.push(`$${i + 1}`); |
| 181 | } |
| 182 | return params; |
| 183 | } |
| 184 | |
| 185 | const { hasOwnProperty } = Object.prototype; |
| 186 | const { apply } = Function.prototype; |
no outgoing calls
no test coverage detected