1.0.2 • Published 5 years ago
@pqt/abbreviate v1.0.2
Installation
npm install @pqt/abbreviate
# OR
yarn add @pqt/abbreviate
Usage
import { abbreviate } from "@pqt/abbreviate";
// Thousands
abbreviate(1234); // => 1K
abbreviate(1234, 1); // => 1.2K
abbreviate(1234, 2); // => 1.23K
abbreviate(1234, 3); // => 1.234K
// Millions
abbreviate(1234123); // => 1M
abbreviate(1234123, 1); // => 1.2M
abbreviate(1234123, 2); // => 1.23M
abbreviate(1234123, 3); // => 1.234M
// Billions
abbreviate(1234123412); // => 1B
abbreviate(1234123412, 1); // => 1.2B
abbreviate(1234123412, 2); // => 1.23B
abbreviate(1234123412, 3); // => 1.234B
// Trillions
abbreviate(1234123412); // => 1T
abbreviate(1234123412, 1); // => 1.2T
abbreviate(1234123412, 2); // => 1.23T
abbreviate(1234123412, 3); // => 1.234T
License
MIT
1.0.2
5 years ago
1.0.2-rc.60c50e7
5 years ago
1.0.2-rc.28be5cb
5 years ago
0.0.0-65259e2
5 years ago
0.0.0-c3eb562
5 years ago
0.0.0-74a3ee3
5 years ago
0.0.0-f2f6400
5 years ago
0.0.0-369722c
5 years ago
1.0.2-rc.8790acd
5 years ago
0.0.0-fa4b22b
5 years ago
1.0.1
5 years ago
1.0.1-rc.58f9d60
5 years ago
0.0.0-eb4a3af
5 years ago
1.0.1-rc.d5e3701
5 years ago
0.0.0-ffe9d3c
5 years ago
1.0.0
5 years ago
1.0.0-rc.7c1fa36
5 years ago
0.0.0-0d3d285
5 years ago
0.0.0-ccd2f83
5 years ago
0.0.0-543f609
5 years ago
0.0.0-86e2177
5 years ago
0.0.0
5 years ago