CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
_createCompounder.js25 linesDownload Raw Back to lodash-es
1import arrayReduce from './_arrayReduce.js';2import deburr from './deburr.js';3import words from './words.js';4 5/** Used to compose unicode capture groups. */6var rsApos = "['\u2019]";7 8/** Used to match apostrophes. */9var reApos = RegExp(rsApos, 'g');10 11/**12 * Creates a function like `_.camelCase`.13 *14 * @private15 * @param {Function} callback The function to combine each word.16 * @returns {Function} Returns the new compounder function.17 */18function createCompounder(callback) {19  return function(string) {20    return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');21  };22}23 24export default createCompounder;25 
basant307/AI_Governance_Project · CoolFace