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