Comparing version 3.5.0 to 3.5.1
@@ -6,3 +6,3 @@ /** | ||
* @license BSD-3-Clause | ||
* @version 3.5.0 | ||
* @version 3.5.1 | ||
*/ | ||
@@ -21,3 +21,3 @@ (function (global) { | ||
}, | ||
longform = { | ||
fullform = { | ||
iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"], | ||
@@ -38,3 +38,3 @@ jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"] | ||
val = 0, | ||
e, base, bits, ceil, long, neg, num, output, round, unix, spacer, standard, symbols; | ||
e, base, bits, ceil, full, neg, num, output, round, unix, spacer, standard, symbols; | ||
@@ -53,3 +53,3 @@ if (isNaN(arg)) { | ||
output = descriptor.output || "string"; | ||
long = descriptor.longform === true; | ||
full = descriptor.fullform === true; | ||
e = descriptor.exponent !== undefined ? descriptor.exponent : -1; | ||
@@ -129,4 +129,4 @@ num = Number(arg); | ||
if (long) { | ||
result[1] = longform[standard][e] + (bits ? "bit" : "byte") + (result[0] > 1 ? "s" : ""); | ||
if (full) { | ||
result[1] = fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] > 1 ? "s" : ""); | ||
} | ||
@@ -133,0 +133,0 @@ |
@@ -8,3 +8,3 @@ "use strict"; | ||
* @license BSD-3-Clause | ||
* @version 3.5.0 | ||
* @version 3.5.1 | ||
*/ | ||
@@ -23,3 +23,3 @@ (function (global) { | ||
}, | ||
longform = { | ||
fullform = { | ||
iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"], | ||
@@ -46,3 +46,3 @@ jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"] | ||
ceil = void 0, | ||
long = void 0, | ||
full = void 0, | ||
neg = void 0, | ||
@@ -69,3 +69,3 @@ num = void 0, | ||
output = descriptor.output || "string"; | ||
long = descriptor.longform === true; | ||
full = descriptor.fullform === true; | ||
e = descriptor.exponent !== undefined ? descriptor.exponent : -1; | ||
@@ -145,4 +145,4 @@ num = Number(arg); | ||
if (long) { | ||
result[1] = longform[standard][e] + (bits ? "bit" : "byte") + (result[0] > 1 ? "s" : ""); | ||
if (full) { | ||
result[1] = fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] > 1 ? "s" : ""); | ||
} | ||
@@ -149,0 +149,0 @@ |
{ | ||
"name": "filesize", | ||
"description": "JavaScript library to generate a human readable String describing the file size", | ||
"version": "3.5.0", | ||
"version": "3.5.1", | ||
"homepage": "http://filesizejs.com", | ||
@@ -6,0 +6,0 @@ "author": "Jason Mulligan <jason.mulligan@avoidwork.com>", |
@@ -20,3 +20,3 @@ # filesize.js | ||
### longform | ||
### fullform | ||
_*(boolean)*_ Enables long form of unit of measure, default is `false` | ||
@@ -60,3 +60,3 @@ | ||
filesize(265318, {standard: "iec"}); // "259.1 KiB" | ||
filesize(265318, {standard: "iec", longform: true}); // "259.1 kibibytes" | ||
filesize(265318, {standard: "iec", fullform: true}); // "259.1 kibibytes" | ||
``` | ||
@@ -63,0 +63,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
15075