Files
lodash/internal/createCompounder.js
John-David Dalton 8c26e6fd4c Bump to v4.0.0.
2016-01-13 01:10:19 -08:00

18 lines
471 B
JavaScript

define(['./arrayReduce', '../deburr', '../words'], function(arrayReduce, deburr, words) {
/**
* 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 function(string) {
return arrayReduce(words(deburr(string)), callback, '');
};
}
return createCompounder;
});