open-consul/ui/packages/consul-ui/app/utils/ucfirst.js

4 lines
95 B
JavaScript

export default function(str) {
return `${str.substr(0, 1).toUpperCase()}${str.substr(1)}`;
}