mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 04:17: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'
|
import words from './words.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -23,7 +23,7 @@ import words from './words.js'
|
|||||||
const camelCase = (string) => (
|
const camelCase = (string) => (
|
||||||
words(`${string}`.replace(/['\u2019]/g, '')).reduce((result, word, index) => {
|
words(`${string}`.replace(/['\u2019]/g, '')).reduce((result, word, index) => {
|
||||||
word = word.toLowerCase()
|
word = word.toLowerCase()
|
||||||
return result + (index ? capitalize(word) : word)
|
return result + (index ? upperFirst(word) : word)
|
||||||
}, '')
|
}, '')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user