UNPKG

@funkit/connect

Version:

Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.

15 lines (14 loc) 644 B
/** * Formats users' account name for display * - If the account name is shorter than 15 characters, it will be displayed as is * - If the account name is longer than 15 characters, it will be shortened to 12 characters + 3 ellipsis * - Additionally, If it is an email, the suffix will be removed * * Examples: * - `chloe@fun.xyz` -> `chloe@fun.xyz` * - `longname@outlook.com` -> `longname` * - `supersuperlongname@gmail.com` -> `supersuperlo...` * - `@chloefunxyz` -> `@chloefunxyz` * - `@chloefunxyzlongtwittername` -> `@chloefunxyz...` */ export declare function formatAccountName(accountName: string, isEmail: boolean): string;