Skip to content

Commit

Permalink
lint: remove unreachable code branches
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Mar 6, 2017
1 parent b34aab5 commit 0532096
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions lib/read.js
Expand Up @@ -31,21 +31,21 @@ module.exports = read
* @param {function} next
* @param {function} parse
* @param {function} debug
* @param {object} [options]
* @api private
* @param {object} options
* @private
*/

function read (req, res, next, parse, debug, options) {
var length
var opts = options || {}
var opts = options
var stream

// flag as parsed
req._body = true

// read options
var encoding = opts.encoding !== null
? opts.encoding || 'utf-8'
? opts.encoding
: null
var verify = opts.verify

Expand Down
5 changes: 2 additions & 3 deletions lib/types/json.js
Expand Up @@ -138,12 +138,11 @@ function json (options) {
*
* @param {string} str
* @return {function}
* @api public
* @private
*/

function firstchar (str) {
var match = FIRST_CHAR_REGEXP.exec(str)
return match ? match[1] : ''
return FIRST_CHAR_REGEXP.exec(str)[1]
}

/**
Expand Down

0 comments on commit 0532096

Please sign in to comment.