import { orderBy } from 'natural-orderby' export function sortObjectByKey( obj: Record, ): Record { const sortedKeys = orderBy(Object.keys(obj)) const sortedObj: Record = {} sortedKeys.forEach((key) => { sortedObj[key] = obj[key] }) return sortedObj } export function capitalizeFirstLetter(str: string): string { return str.charAt(0).toUpperCase() + str.slice(1) }