sentence-case.js 296 B

12345678910111213
  1. var noCase = require('no-case')
  2. var upperCaseFirst = require('upper-case-first')
  3. /**
  4. * Sentence case a string.
  5. *
  6. * @param {string} value
  7. * @param {string} [locale]
  8. * @return {string}
  9. */
  10. module.exports = function (value, locale) {
  11. return upperCaseFirst(noCase(value, locale), locale)
  12. }