inte-format
v1.0.0
Published
A package that formats integers by adding commas for readability or abbreviating large numbers with suffixes.
Downloads
4
Readme
inte-formatter
Format numbers with optional comma separators or suffixes (K, M, B, T) for concise representation of large numbers.
Installation
Install the package via npm:
npm install int-formatterUsage
import { formatInt } from "int-formatter";
const option = { commas: true, suffix: true };
console.log(formatInt(1234567890, option));Options
comma: boolean - If true, formats the number with comma separators (e.g., 1,234,567).suffix: boolean - If true, formats the number with suffixes (K, M, B, T) for thousands, millions, billions, and trillions.
License
Licensed under the MIT license.
