mirror of https://github.com/MingweiSamuel/Riven
13 lines
225 B
JavaScript
13 lines
225 B
JavaScript
|
var noCase = require('no-case')
|
||
|
|
||
|
/**
|
||
|
* Snake case a string.
|
||
|
*
|
||
|
* @param {string} value
|
||
|
* @param {string} [locale]
|
||
|
* @return {string}
|
||
|
*/
|
||
|
module.exports = function (value, locale) {
|
||
|
return noCase(value, locale, '_')
|
||
|
}
|