@transloadit/prettier-bytes
Advanced tools
Comparing version 0.1.3 to 0.2.0
@@ -16,3 +16,3 @@ "use strict"; | ||
const exponent = Math.min(Math.floor(Math.log(num) / Math.log(1024)), units.length - 1); | ||
num = Number(num / Math.pow(1024, exponent)); | ||
num = Number(num / 1024 ** exponent); | ||
const unit = units[exponent]; | ||
@@ -19,0 +19,0 @@ if (num >= 10 || num % 1 === 0) { |
{ | ||
"name": "@transloadit/prettier-bytes", | ||
"license": "MIT", | ||
"version": "0.1.3", | ||
"version": "0.2.0", | ||
"publishConfig": { | ||
@@ -14,3 +14,3 @@ "access": "public" | ||
"main": "dist/prettierBytes.js", | ||
"typings": "dist/prettierBytes.d.ts", | ||
"types": "dist/prettierBytes.d.ts", | ||
"files": [ | ||
@@ -27,3 +27,3 @@ "dist" | ||
}, | ||
"gitHead": "b9159b6f037336d9325656c35b9b15023d5c1ce7" | ||
"gitHead": "3fbbb8c4c18eeb9b9de5e3a5c022d46a7cc40800" | ||
} |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
4502
6
24
1