00001 var arrayReduce = require('./_arrayReduce'), 00002 deburr = require('./deburr'), 00003 words = require('./words'); 00004 00006 var rsApos = "['\u2019]"; 00007 00009 var reApos = RegExp(rsApos, 'g'); 00010 00018 function createCompounder(callback) { 00019 return function(string) { 00020 return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); 00021 }; 00022 } 00023 00024 module.exports = createCompounder;