Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

string-utils.js 459B

12345678910111213141516171819202122
  1. /**
  2. * @fileoverview Utilities to operate on strings.
  3. * @author Stephen Wade
  4. */
  5. "use strict";
  6. /**
  7. * Converts the first letter of a string to uppercase.
  8. * @param {string} string The string to operate on
  9. * @returns {string} The converted string
  10. */
  11. function upperCaseFirst(string) {
  12. if (string.length <= 1) {
  13. return string.toUpperCase();
  14. }
  15. return string[0].toUpperCase() + string.slice(1);
  16. }
  17. module.exports = {
  18. upperCaseFirst
  19. };