Comparing version 3.5.4 to 3.5.5
@@ -0,0 +0,0 @@ { |
@@ -6,3 +6,3 @@ /** | ||
* @license BSD-3-Clause | ||
* @version 3.5.4 | ||
* @version 3.5.5 | ||
*/ | ||
@@ -63,22 +63,21 @@ (function (global) { | ||
// Determining the exponent | ||
if (e === -1 || isNaN(e)) { | ||
e = Math.floor(Math.log(num) / Math.log(ceil)); | ||
if (e < 0) { | ||
e = 0; | ||
} | ||
} | ||
// Exceeding supported length, time to reduce & multiply | ||
if (e > 8) { | ||
e = 8; | ||
} | ||
// Zero is now a special case because bytes divide by 1 | ||
if (num === 0) { | ||
e = 0; | ||
result[0] = 0; | ||
result[1] = unix ? "" : !bits ? "B" : "b"; | ||
result[1] = unix ? "" : symbol[standard][bits ? "bits" : "bytes"][e]; | ||
} else { | ||
// Determining the exponent | ||
if (e === -1 || isNaN(e)) { | ||
e = Math.floor(Math.log(num) / Math.log(ceil)); | ||
if (e < 0) { | ||
e = 0; | ||
} | ||
} | ||
// Exceeding supported length, time to reduce & multiply | ||
if (e > 8) { | ||
e = 8; | ||
} | ||
val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e)); | ||
@@ -85,0 +84,0 @@ |
@@ -8,3 +8,3 @@ "use strict"; | ||
* @license BSD-3-Clause | ||
* @version 3.5.4 | ||
* @version 3.5.5 | ||
*/ | ||
@@ -80,22 +80,21 @@ (function (global) { | ||
// Determining the exponent | ||
if (e === -1 || isNaN(e)) { | ||
e = Math.floor(Math.log(num) / Math.log(ceil)); | ||
if (e < 0) { | ||
e = 0; | ||
} | ||
} | ||
// Exceeding supported length, time to reduce & multiply | ||
if (e > 8) { | ||
e = 8; | ||
} | ||
// Zero is now a special case because bytes divide by 1 | ||
if (num === 0) { | ||
e = 0; | ||
result[0] = 0; | ||
result[1] = unix ? "" : !bits ? "B" : "b"; | ||
result[1] = unix ? "" : symbol[standard][bits ? "bits" : "bytes"][e]; | ||
} else { | ||
// Determining the exponent | ||
if (e === -1 || isNaN(e)) { | ||
e = Math.floor(Math.log(num) / Math.log(ceil)); | ||
if (e < 0) { | ||
e = 0; | ||
} | ||
} | ||
// Exceeding supported length, time to reduce & multiply | ||
if (e > 8) { | ||
e = 8; | ||
} | ||
val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e)); | ||
@@ -102,0 +101,0 @@ |
{ | ||
"name": "filesize", | ||
"description": "JavaScript library to generate a human readable String describing the file size", | ||
"version": "3.5.4", | ||
"version": "3.5.5", | ||
"homepage": "http://filesizejs.com", | ||
@@ -6,0 +6,0 @@ "author": "Jason Mulligan <jason.mulligan@avoidwork.com>", |
@@ -0,0 +0,0 @@ # filesize.js |
Sorry, the diff of this file is not supported yet
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
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
15379
309