Sha256: 937a40bd2e1fc8c3cc295e8309acbcb5ab1559b3b765993127354994f11b2809
Contents?: true
Size: 649 Bytes
Versions: 153
Compression:
Stored size: 649 Bytes
Contents
var createCompounder = require('../internal/createCompounder'); /** * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). * * @static * @memberOf _ * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the kebab cased string. * @example * * _.kebabCase('Foo Bar'); * // => 'foo-bar' * * _.kebabCase('fooBar'); * // => 'foo-bar' * * _.kebabCase('__foo_bar__'); * // => 'foo-bar' */ var kebabCase = createCompounder(function(result, word, index) { return result + (index ? '-' : '') + word.toLowerCase(); }); module.exports = kebabCase;
Version data entries
153 entries across 80 versions & 8 rubygems