Remove toString from createCompounder.

This commit is contained in:
John-David Dalton
2017-03-15 22:34:15 -07:00
parent 9d11b48ce5
commit 164bc71328

View File

@@ -1,5 +1,4 @@
import arrayReduce from './arrayReduce.js'
import toString from '../toString.js'
import words from '../words.js'
/** Used to match apostrophes. */
@@ -14,7 +13,7 @@ const reApos = /['\u2019]/g
*/
function createCompounder(callback) {
return (string) => (
arrayReduce(words(toString(string).replace(reApos, '')), callback, '')
arrayReduce(words(`${ string }`.replace(reApos, '')), callback, '')
)
}