js-abbreviation-number
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -5,3 +5,3 @@ "use strict"; | ||
padding: true, | ||
symbols: ["", "K", "M", "G", "T", "P", "E"], | ||
symbols: ["", "k", "M", "G", "T", "P", "E"], | ||
}; | ||
@@ -8,0 +8,0 @@ function abbreviateNumber(num, digit, options) { |
{ | ||
"name": "js-abbreviation-number", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Abbreviate numbers in javascript", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -29,11 +29,11 @@ <div align="center"> | ||
const num = abbreviateNumber(1000, 1); // expected 1.0K | ||
const num = abbreviateNumber(1000, 1); // expected 1.0k | ||
const num = abbreviateNumber(12, 0); // expected 12 | ||
const num = abbreviateNumber(1100, 2); // expected 1.10K | ||
const num = abbreviateNumber(1100, 2); // expected 1.10k | ||
const num = abbreviateNumber(1100, 2, {padding: false}); // expected 1.1K | ||
const num = abbreviateNumber(1100, 2, {padding: false}); // expected 1.1k | ||
const num = abbreviateNumber(1234.56, 2); // expected 1.23K | ||
const num = abbreviateNumber(1234.56, 2); // expected 1.23k | ||
@@ -52,3 +52,3 @@ const num = abbreviateNumber(1234, 1, {symbols: ['', 'kg']}); // expected 1.2kg | ||
- `symbols` can be an array of units, defaulting to `["", "K", "M", "G", "T", "P", "E"]`. | ||
- `symbols` can be an array of units, defaulting to `["", "k", "M", "G", "T", "P", "E"]`. | ||
- `padding` determines whether to keep the exact number of digits or to drop trailing zeroes. | ||
@@ -55,0 +55,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package