constant-case.js 292 B

12345678910111213
  1. var upperCase = require('upper-case')
  2. var snakeCase = require('snake-case')
  3. /**
  4. * Constant case a string.
  5. *
  6. * @param {String} string
  7. * @param {String} [locale]
  8. * @return {String}
  9. */
  10. module.exports = function (string, locale) {
  11. return upperCase(snakeCase(string, locale), locale)
  12. }