Remove createCompounder.

This commit is contained in:
John-David Dalton
2017-03-26 21:27:06 -07:00
parent 4b80666a30
commit d7bdf0ae25
7 changed files with 32 additions and 39 deletions

View File

@@ -1,19 +0,0 @@
import words from '../words.js'
/** Used to match apostrophes. */
const reApos = /['\u2019]/g
/**
* Creates a function like `camelCase`.
*
* @private
* @param {Function} callback The function to combine each word.
* @returns {Function} Returns the new compounder function.
*/
function createCompounder(callback) {
return (string) => (
words(`${ string }`.replace(reApos, '')).reduce(callback, '')
)
}
export default createCompounder