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