mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
This commit is contained in:
committed by
John-David Dalton
parent
136d5253e7
commit
3b96b91991
@@ -1,4 +1,4 @@
|
||||
import capitalize from './capitalize.js'
|
||||
import upperFirst from './upperFirst.js'
|
||||
import words from './words.js'
|
||||
|
||||
/**
|
||||
@@ -23,7 +23,7 @@ import words from './words.js'
|
||||
const camelCase = (string) => (
|
||||
words(`${string}`.replace(/['\u2019]/g, '')).reduce((result, word, index) => {
|
||||
word = word.toLowerCase()
|
||||
return result + (index ? capitalize(word) : word)
|
||||
return result + (index ? upperFirst(word) : word)
|
||||
}, '')
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user