1.0.2 • Published 4 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
4 years ago
1.0.2-rc.60c50e7
4 years ago
1.0.2-rc.28be5cb
4 years ago
0.0.0-65259e2
4 years ago
0.0.0-c3eb562
4 years ago
0.0.0-74a3ee3
4 years ago
0.0.0-f2f6400
4 years ago
0.0.0-369722c
4 years ago
1.0.2-rc.8790acd
4 years ago
0.0.0-fa4b22b
4 years ago
1.0.1
4 years ago
1.0.1-rc.58f9d60
4 years ago
0.0.0-eb4a3af
4 years ago
1.0.1-rc.d5e3701
4 years ago
0.0.0-ffe9d3c
4 years ago
1.0.0
4 years ago
1.0.0-rc.7c1fa36
4 years ago
0.0.0-0d3d285
4 years ago
0.0.0-ccd2f83
4 years ago
0.0.0-543f609
4 years ago
0.0.0-86e2177
4 years ago
0.0.0
4 years ago