forked from mirror/Riven
1
0
Fork 0
Riven/riven/srcgen/node_modules/header-case/header-case.js

16 lines
334 B
JavaScript
Raw Normal View History

var noCase = require('no-case')
var upperCase = require('upper-case')
/**
* Header case a string.
*
* @param {string} value
* @param {string} [locale]
* @return {string}
*/
module.exports = function (value, locale) {
return noCase(value, locale, '-').replace(/^.|-./g, function (m) {
return upperCase(m, locale)
})
}