Skip to content

Commit

Permalink
lint: change casing for constants
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Jul 25, 2017
1 parent ad954a6 commit 9e435c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ var extname = require('path').extname
* @private
*/

var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/
var textTypeRegExp = /^text\//i
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/
var TEXT_TYPE_REGEXP = /^text\//i

/**
* Module exports.
Expand Down Expand Up @@ -52,15 +52,15 @@ function charset (type) {
}

// TODO: use media-typer
var match = extractTypeRegExp.exec(type)
var match = EXTRACT_TYPE_REGEXP.exec(type)
var mime = match && db[match[1].toLowerCase()]

if (mime && mime.charset) {
return mime.charset
}

// default text/* to utf-8
if (match && textTypeRegExp.test(match[1])) {
if (match && TEXT_TYPE_REGEXP.test(match[1])) {
return 'UTF-8'
}

Expand Down Expand Up @@ -110,7 +110,7 @@ function extension (type) {
}

// TODO: use media-typer
var match = extractTypeRegExp.exec(type)
var match = EXTRACT_TYPE_REGEXP.exec(type)

// get extensions
var exts = match && exports.extensions[match[1].toLowerCase()]
Expand Down

0 comments on commit 9e435c8

Please sign in to comment.