Millify
Convert long numbers to pretty, human-readable strings
Install / Use
/learn @izolate/MillifyREADME
Millify
Converts long numbers into pretty, human-readable strings.
Before :unamused: | After :tada:
--- | ---
2000 | '2K'
10000 | '10k'
42500 | '42.5 kg'
1250000 | '1.25 MB'
2700000000 | '2.7 bil'
Install
Get it on npm:
npm install millify
Usage
Command line
$ millify 12345
12.3K
See millify --help for options.
Programmatically
millify(value: number, options: MillifyOptions)
import millify from "millify";
// For CommonJS: `const { millify } = require("millify");`
millify(2500); // 2.5K
millify(1024000, {
precision: 3,
lowercase: true
});
// 1.024m
millify(39500, {
precision: 2,
locales: "de-DE"
});
// 3,95K
millify(1440000, {
units: ["B", "KB", "MB", "GB", "TB"],
space: true,
});
// 1.44 MB
Options
Name | Type | Default | Description
--- | --- | --- | ---
precision | number | 1 | Number of decimal places to use
locales | string \| Array<string> | browser language | Formats the number in different languages
lowercase | boolean | false | Use lowercase abbreviations
space | boolean | false | Add a space between number and abbreviation
units | Array<string> | ['', 'K', 'M', 'B', 'T', 'P', 'E'] | Unit abbreviations
Related Skills
node-connect
337.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.1kCommit, push, and open a PR
