* Count the number of parameters, stopping once limit reached * * @param {string} body * @param {number} limit * @api private
(body, limit)
| 189 | */ |
| 190 | |
| 191 | function parameterCount (body, limit) { |
| 192 | var count = 0 |
| 193 | var index = 0 |
| 194 | |
| 195 | while ((index = body.indexOf('&', index)) !== -1) { |
| 196 | count++ |
| 197 | index++ |
| 198 | |
| 199 | if (count === limit) { |
| 200 | return undefined |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | return count |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | * Get parser for module name dynamically. |
no outgoing calls
no test coverage detected