Version 1
[yaffs-website] / node_modules / video.js / es5 / utils / to-title-case.js
1 'use strict';
2
3 exports.__esModule = true;
4 /**
5  * @file to-title-case.js
6  * @module to-title-case
7  */
8
9 /**
10  * Uppercase the first letter of a string.
11  *
12  * @param {string} string
13  *        String to be uppercased
14  *
15  * @return {string}
16  *         The string with an uppercased first letter
17  */
18 function toTitleCase(string) {
19   if (typeof string !== 'string') {
20     return string;
21   }
22
23   return string.charAt(0).toUpperCase() + string.slice(1);
24 }
25
26 exports['default'] = toTitleCase;