Skip to content

cosmosPercentToString() function in the BitBadges TypeScript SDK (bitbadges on npm): signature, properties, methods, and usage.

cosmosPercentToString(value, maxDecimals?): string

Defined in: packages/bitbadgesjs-sdk/src/core/coin-utils.ts:268

Format a percentage value (e.g. 0.005 → "0.5%").

Parameters

value

number

maxDecimals?

number = 3

Returns

string

Edit this page on GitHub