1 var createCompounder = require('./_createCompounder');
5 * [snake case](https://en.wikipedia.org/wiki/Snake_case).
11 * @param {string} [string=''] The string to convert.
12 * @returns {string} Returns the snake cased string.
15 * _.snakeCase('Foo Bar');
18 * _.snakeCase('fooBar');
21 * _.snakeCase('--FOO-BAR--');
24 var snakeCase = createCompounder(function(result, word, index) {
25 return result + (index ? '_' : '') + word.toLowerCase();
28 module.exports = snakeCase;