shortenLargeNumber

Shorten the string for large value Mainly used for Examples: 10_000 -> 10k 1_000_000 -> 1M 1_000_000_000 -> 1B

Example

import { shortenLargeNumber } from "thirdweb/utils";
const numStr = shortenLargeNumber(1_000_000_000);
function shortenLargeNumber(value: number): string;

Parameters

Type

let value: number;

Returns

let returnType: string;