Version 1
[yaffs-website] / node_modules / video.js / es5 / utils / to-title-case.js
diff --git a/node_modules/video.js/es5/utils/to-title-case.js b/node_modules/video.js/es5/utils/to-title-case.js
new file mode 100644 (file)
index 0000000..59ad7ce
--- /dev/null
@@ -0,0 +1,26 @@
+'use strict';
+
+exports.__esModule = true;
+/**
+ * @file to-title-case.js
+ * @module to-title-case
+ */
+
+/**
+ * Uppercase the first letter of a string.
+ *
+ * @param {string} string
+ *        String to be uppercased
+ *
+ * @return {string}
+ *         The string with an uppercased first letter
+ */
+function toTitleCase(string) {
+  if (typeof string !== 'string') {
+    return string;
+  }
+
+  return string.charAt(0).toUpperCase() + string.slice(1);
+}
+
+exports['default'] = toTitleCase;