Version 1
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / _createCompounder.js
diff --git a/node_modules/grunt-legacy-util/node_modules/lodash/_createCompounder.js b/node_modules/grunt-legacy-util/node_modules/lodash/_createCompounder.js
new file mode 100644 (file)
index 0000000..bfa4ee5
--- /dev/null
@@ -0,0 +1,18 @@
+var arrayReduce = require('./_arrayReduce'),
+    deburr = require('./deburr'),
+    words = require('./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, '');
+  };
+}
+
+module.exports = createCompounder;