formatNumber

Round up a number to a certain decimal place

Example

import { formatNumber } from "thirdweb/utils";
const value = formatNumber(12.1214141, 1); // 12.1
function formatNumber(value: number, decimalPlaces: number): number;

Parameters

Type

let value: number;

Type

let decimalPlaces: number;

Returns

let returnType: number;