7d92c268037dd52edae790f4a5cc454f2d2b32f4
[yaffs-website] / node_modules / uncss / node_modules / lodash / internal / createCompounder.js
1 var arrayReduce = require('./arrayReduce'),
2     deburr = require('../deburr'),
3     words = require('../words');
4
5 /**
6  * Creates a function like `_.camelCase`.
7  *
8  * @private
9  * @param {Function} callback The function to combine each word.
10  * @returns {Function} Returns the new compounder function.
11  */
12 function createCompounder(callback) {
13   return function(string) {
14     return arrayReduce(words(deburr(string)), callback, '');
15   };
16 }
17
18 module.exports = createCompounder;