X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-legacy-log%2Fnode_modules%2Flodash%2Fstring%2FkebabCase.js;fp=node_modules%2Fgrunt-legacy-log%2Fnode_modules%2Flodash%2Fstring%2FkebabCase.js;h=d29c2f908a102d412a4de11dcb14f4a7c6a75b30;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-legacy-log/node_modules/lodash/string/kebabCase.js b/node_modules/grunt-legacy-log/node_modules/lodash/string/kebabCase.js new file mode 100644 index 000000000..d29c2f908 --- /dev/null +++ b/node_modules/grunt-legacy-log/node_modules/lodash/string/kebabCase.js @@ -0,0 +1,26 @@ +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;