forked from mirror/Riven
14 lines
289 B
JavaScript
14 lines
289 B
JavaScript
|
var upperCase = require('upper-case')
|
||
|
var snakeCase = require('snake-case')
|
||
|
|
||
|
/**
|
||
|
* Constant case a string.
|
||
|
*
|
||
|
* @param {string} value
|
||
|
* @param {string} [locale]
|
||
|
* @return {string}
|
||
|
*/
|
||
|
module.exports = function (value, locale) {
|
||
|
return upperCase(snakeCase(value, locale), locale)
|
||
|
}
|