CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes45downloads
camelCase.js30 linesDownload Raw Back to lodash
1var capitalize = require('./capitalize'),2    createCompounder = require('./_createCompounder');3 4/**5 * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).6 *7 * @static8 * @memberOf _9 * @since 3.0.010 * @category String11 * @param {string} [string=''] The string to convert.12 * @returns {string} Returns the camel cased string.13 * @example14 *15 * _.camelCase('Foo Bar');16 * // => 'fooBar'17 *18 * _.camelCase('--foo-bar--');19 * // => 'fooBar'20 *21 * _.camelCase('__FOO_BAR__');22 * // => 'fooBar'23 */24var camelCase = createCompounder(function(result, word, index) {25  word = word.toLowerCase();26  return result + (index ? capitalize(word) : word);27});28 29module.exports = camelCase;30 
basant307/AI_Governance_Project · CoolFace