Add capitalizeFirstLetter helper

This commit is contained in:
abefernan
2023-04-27 16:31:36 +02:00
parent 589ba19a92
commit c081963dac
+4
View File
@@ -4,6 +4,10 @@ import { fromBase64, fromBech32, toBase64, toBech32 } from "@cosmjs/encoding";
import { Decimal } from "@cosmjs/math";
import { ChainInfo } from "../types";
function capitalizeFirstLetter(str: string): string {
return str.charAt(0).toUpperCase() + str.slice(1);
}
function ellideMiddle(str: string, maxOutLen: number): string {
if (str.length <= maxOutLen) {
return str;