Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions lib/types/urlencoded.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,19 +208,9 @@
*/

function parameterCount (body, limit) {
var count = 0
var index = 0
var len = body.split('&').length;

Check failure on line 211 in lib/types/urlencoded.js

View workflow job for this annotation

GitHub Actions / Lint

Extra semicolon

while ((index = body.indexOf('&', index)) !== -1) {
count++
index++

if (count === limit) {
return undefined
}
}

return count
return len > limit ? undefined : len - 1;

Check failure on line 213 in lib/types/urlencoded.js

View workflow job for this annotation

GitHub Actions / Lint

Extra semicolon
}

/**
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"lint": "eslint .",
"test": "mocha --reporter spec --check-leaks test/",
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",

"test-cov": "nyc --reporter=html --reporter=text npm test"
}
}
Loading