format-token-price
v0.0.7
Published
     
e.g. Set the price information in the header

import { showLessAmount } from 'format-token-price'
// 0.00009299000499
showLessAmount("0.0000092000499", 4, 4) = 0.0₄9299import { abandonInvalid0 } from 'format-token-price'
// e.g. abandon invalid 0, use
// 0.00092000499
// 0.00092000499.fixed(8) = 0.00092000
abandonInvalid0("0.00092000499", 8) = 0.00092

When the token price is very small and there are multiple zeros, a subscript abbreviation is required. You can refer to this code
code = https://github.com/sunmoon-a11y/format-amount.git
