Skip to content
This repository was archived by the owner on Jan 24, 2023. It is now read-only.
/ si-postfix Public archive

Convert a number into its postfixed si name equivalent based on the selected scale.

Notifications You must be signed in to change notification settings

aphex3k/si-postfix

Repository files navigation

SI Postfix

Convert a number into its postfixed si name equivalent based on the selected scale.

e.g. 1000 becomes 1k

Usage

import * as si from "si-postfix";

const text = si.postfix(1000)

console.log(text) // ==> "1k"

Names of large numbers

While the task seems trivial, long and short scales are two of several naming systems for integer powers of ten which use some of the same terms with different magnitudes.

See the names of large numbers on Wikipedia for more details.

About

Convert a number into its postfixed si name equivalent based on the selected scale.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published