Skip to content

Commit

Permalink
fix: use string inerpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jan 12, 2021
1 parent 2687541 commit 92be9d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/deps/underscore-plus.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const regexDaherize = /([A-Z])|(_)/g
export function dasherize (string) {
if (!string) { return '' }

string = string[0].toLowerCase() + string.slice(1)
string = `${string[0].toLowerCase()}${string.slice(1)}`
return string.replace(regexDaherize, function (m, letter) {
if (letter) {
return '-' + letter.toLowerCase()
return `-${letter.toLowerCase()}`
} else {
return '-'
}
Expand Down

0 comments on commit 92be9d8

Please sign in to comment.