1 var arrayReduce = require('./_arrayReduce'),
2 deburr = require('./deburr'),
3 words = require('./words');
5 /** Used to compose unicode capture groups. */
6 var rsApos = "['\u2019]";
8 /** Used to match apostrophes. */
9 var reApos = RegExp(rsApos, 'g');
12 * Creates a function like `_.camelCase`.
15 * @param {Function} callback The function to combine each word.
16 * @returns {Function} Returns the new compounder function.
18 function createCompounder(callback) {
19 return function(string) {
20 return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
24 module.exports = createCompounder;