+0
-0
@@ -0,0 +0,0 @@ { |
@@ -6,3 +6,3 @@ /** | ||
| * @license BSD-3-Clause | ||
| * @version 3.5.3 | ||
| * @version 3.5.4 | ||
| */ | ||
@@ -37,3 +37,3 @@ (function (global) { | ||
| val = 0, | ||
| e, base, bits, ceil, full, neg, num, output, round, unix, spacer, standard, symbols; | ||
| e, base, bits, ceil, full, fullforms, neg, num, output, round, unix, spacer, standard, symbols; | ||
@@ -53,2 +53,3 @@ if (isNaN(arg)) { | ||
| full = descriptor.fullform === true; | ||
| fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : []; | ||
| e = descriptor.exponent !== undefined ? descriptor.exponent : -1; | ||
@@ -130,3 +131,3 @@ num = Number(arg); | ||
| if (full) { | ||
| result[1] = fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] === 1 ? "" : "s"); | ||
| result[1] = fullforms[e] ? fullforms[e] : fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] === 1 ? "" : "s"); | ||
| } | ||
@@ -133,0 +134,0 @@ |
+4
-2
@@ -8,3 +8,3 @@ "use strict"; | ||
| * @license BSD-3-Clause | ||
| * @version 3.5.3 | ||
| * @version 3.5.4 | ||
| */ | ||
@@ -46,2 +46,3 @@ (function (global) { | ||
| full = void 0, | ||
| fullforms = void 0, | ||
| neg = void 0, | ||
@@ -69,2 +70,3 @@ num = void 0, | ||
| full = descriptor.fullform === true; | ||
| fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : []; | ||
| e = descriptor.exponent !== undefined ? descriptor.exponent : -1; | ||
@@ -146,3 +148,3 @@ num = Number(arg); | ||
| if (full) { | ||
| result[1] = fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] === 1 ? "" : "s"); | ||
| result[1] = fullforms[e] ? fullforms[e] : fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] === 1 ? "" : "s"); | ||
| } | ||
@@ -149,0 +151,0 @@ |
+0
-0
@@ -0,0 +0,0 @@ Copyright (c) 2017, Jason Mulligan |
+1
-1
| { | ||
| "name": "filesize", | ||
| "description": "JavaScript library to generate a human readable String describing the file size", | ||
| "version": "3.5.3", | ||
| "version": "3.5.4", | ||
| "homepage": "http://filesizejs.com", | ||
@@ -6,0 +6,0 @@ "author": "Jason Mulligan <jason.mulligan@avoidwork.com>", |
+4
-0
@@ -23,2 +23,5 @@ # filesize.js | ||
| ### fullforms | ||
| _*(array)*_ Array of full form overrides, default is `[]` | ||
| ### output | ||
@@ -61,2 +64,3 @@ _*(string)*_ Output of function (`array`, `exponent`, `object`, or `string`), default is `string` | ||
| filesize(265318, {standard: "iec", fullform: true}); // "259.1 kibibytes" | ||
| filesize(12, {fullform: true, fullforms: ["байтов"]}); // "12 байтов" | ||
| ``` | ||
@@ -63,0 +67,0 @@ |
Sorry, the diff of this file is not supported yet
15032
0.56%311
0.97%83
5.06%