pascalCase.js 340 B

12345678910111213
  1. var toString = require('../lang/toString');
  2. var camelCase = require('./camelCase');
  3. var upperCase = require('./upperCase');
  4. /**
  5. * camelCase + UPPERCASE first char
  6. */
  7. function pascalCase(str){
  8. str = toString(str);
  9. return camelCase(str).replace(/^[a-z]/, upperCase);
  10. }
  11. module.exports = pascalCase;