Retorna uma versão abreviada do mesmo com sufixos de unidade (mil, milhão, bilhão, etc).
Last updated 1 year ago
Parâmetrosinput: options?: Retorno
Parâmetros
input:
options?:
Retorno
const { abbreviate } = require("util-stunks"); abbreviate(100) // 100 abbreviate(1555400) // 1.5M abbreviate(1555400, { display: 0 }); // 1M abbreviate(1555400, { display: 2 }); // 1.55m abbreviate(1555400, { round: true }); // 2M
import { abbreviate } from "util-stunks"; abbreviate(100) // 100 abbreviate(1555400) // 1.5M abbreviate(1555400, { display: 0 }); // 1M abbreviate(1555400, { display: 2 }); // 1.55m abbreviate(1555400, { round: true }); // 2M