basant307/AI_Governance_Project
048
1var createCompounder = require('./_createCompounder');2 3/**4 * Converts `string` to5 * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).6 *7 * @static8 * @memberOf _9 * @since 3.0.010 * @category String11 * @param {string} [string=''] The string to convert.12 * @returns {string} Returns the kebab cased string.13 * @example14 *15 * _.kebabCase('Foo Bar');16 * // => 'foo-bar'17 *18 * _.kebabCase('fooBar');19 * // => 'foo-bar'20 *21 * _.kebabCase('__FOO_BAR__');22 * // => 'foo-bar'23 */24var kebabCase = createCompounder(function(result, word, index) {25 return result + (index ? '-' : '') + word.toLowerCase();26});27 28module.exports = kebabCase;29 