👀abbreviate
Retorna uma versão abreviada do mesmo com sufixos de unidade (mil, milhão, bilhão, etc).
Tipos:
Parâmetros
input: number
options?: AbbreviateOptions
Retorno
Exemplo de uso
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 }); // 2Mimport { 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 }); // 2Mimport { 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 }); // 2MLast updated