Skip to content

Commit

Permalink
fix: replaced String.includes() with indexOf() due to IE incompatibil…
Browse files Browse the repository at this point in the history
…ity (#45)
  • Loading branch information
luish authored and Kent C. Dodds committed Apr 30, 2018
1 parent 5f2c809 commit 486549f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Expand Up @@ -187,8 +187,8 @@ function getAcronym(string) {
*/
function getCaseRanking(testString) {
const containsUpperCase = testString.toLowerCase() !== testString
const containsDash = testString.includes('-')
const containsUnderscore = testString.includes('_')
const containsDash = testString.indexOf('-') >= 0
const containsUnderscore = testString.indexOf('_') >= 0

if (!containsUpperCase && !containsUnderscore && containsDash) {
return caseRankings.KEBAB
Expand Down

0 comments on commit 486549f

Please sign in to comment.