Skip to content

Commit eb881ef

Browse files
Shawn DellyssePhillip9587
authored andcommitted
cleanup / fix linter warnings
1 parent 7d7ab1d commit eb881ef

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

lib/generic-parser.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ var typeis = require('type-is')
2626

2727
module.exports = generic
2828

29-
3029
/**
3130
* Create a middleware to parse JSON bodies.
3231
*
@@ -58,7 +57,7 @@ function generic (options) {
5857
: type
5958

6059
// create the appropriate charset validating function
61-
var validCharset = typeof charset !== "function"
60+
var validCharset = typeof charset !== 'function'
6261
? charsetValidator(charset)
6362
: charset
6463

lib/types/urlencoded.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -121,21 +121,6 @@ function createQueryParser (options, extended) {
121121
}
122122
}
123123

124-
/**
125-
* Get the charset of a request.
126-
*
127-
* @param {object} req
128-
* @api private
129-
*/
130-
131-
function getCharset (req) {
132-
try {
133-
return (contentType.parse(req).parameters.charset || '').toLowerCase()
134-
} catch (e) {
135-
return undefined
136-
}
137-
}
138-
139124
/**
140125
* Count the number of parameters, stopping once limit reached
141126
*

0 commit comments

Comments
 (0)