mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 20:07:49 +00:00
Remove toString from createCompounder.
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import arrayReduce from './arrayReduce.js'
|
import arrayReduce from './arrayReduce.js'
|
||||||
import toString from '../toString.js'
|
|
||||||
import words from '../words.js'
|
import words from '../words.js'
|
||||||
|
|
||||||
/** Used to match apostrophes. */
|
/** Used to match apostrophes. */
|
||||||
@@ -14,7 +13,7 @@ const reApos = /['\u2019]/g
|
|||||||
*/
|
*/
|
||||||
function createCompounder(callback) {
|
function createCompounder(callback) {
|
||||||
return (string) => (
|
return (string) => (
|
||||||
arrayReduce(words(toString(string).replace(reApos, '')), callback, '')
|
arrayReduce(words(`${ string }`.replace(reApos, '')), callback, '')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user