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

9 lines
175 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
export default function (str) {
return `${str.substr(0, 1).toUpperCase()}${str.substr(1)}`;
}