Remove arrayReduce from createCompounder.

This commit is contained in:
John-David Dalton
2017-03-15 22:35:14 -07:00
parent 164bc71328
commit 929a996987

View File

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