Skip to content

Commit 295907c

Browse files
committed
Building
1 parent 1d41805 commit 295907c

9 files changed

+57
-13
lines changed

lib/filesize.es6.js

+25-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* @copyright 2022 Jason Mulligan <[email protected]>
55
* @license BSD-3-Clause
6-
* @version 9.0.8
6+
* @version 9.0.9
77
*/
88
(function (global, factory) {
99
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -58,7 +58,24 @@
5858
* @param {Object} descriptor [Optional] Flags
5959
* @return {String} Readable file size String
6060
*/
61-
function filesize (arg, {bits = false, pad = false, base = -1, round = 2, locale = EMPTY, localeOptions = {}, separator = EMPTY, spacer = SPACE, symbols = {}, standard = EMPTY, output = STRING, fullform = false, fullforms = [], exponent = -1, roundingMethod = ROUND, precision = 0} = {}) {
61+
function filesize (arg, {
62+
bits = false,
63+
pad = false,
64+
base = -1,
65+
round = 2,
66+
locale = EMPTY,
67+
localeOptions = {},
68+
separator = EMPTY,
69+
spacer = SPACE,
70+
symbols = {},
71+
standard = EMPTY,
72+
output = STRING,
73+
fullform = false,
74+
fullforms = [],
75+
exponent = -1,
76+
roundingMethod = ROUND,
77+
precision = 0
78+
} = {}) {
6279
let e = exponent,
6380
num = Number(arg),
6481
result = [],
@@ -180,7 +197,12 @@
180197
}
181198

182199
// Returning Array, Object, or String (default)
183-
return output === ARRAY ? result : output === OBJECT ? {value: result[0], symbol: result[1], exponent: e, unit: u} : result.join(spacer);
200+
return output === ARRAY ? result : output === OBJECT ? {
201+
value: result[0],
202+
symbol: result[1],
203+
exponent: e,
204+
unit: u
205+
} : result.join(spacer);
184206
}
185207

186208
// Partial application for functional programming

lib/filesize.es6.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/filesize.es6.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/filesize.esm.js

+25-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* @copyright 2022 Jason Mulligan <[email protected]>
55
* @license BSD-3-Clause
6-
* @version 9.0.8
6+
* @version 9.0.9
77
*/
88
const ARRAY = "array";
99
const BIT = "bit";
@@ -52,7 +52,24 @@ const strings = {
5252
* @param {Object} descriptor [Optional] Flags
5353
* @return {String} Readable file size String
5454
*/
55-
function filesize (arg, {bits = false, pad = false, base = -1, round = 2, locale = EMPTY, localeOptions = {}, separator = EMPTY, spacer = SPACE, symbols = {}, standard = EMPTY, output = STRING, fullform = false, fullforms = [], exponent = -1, roundingMethod = ROUND, precision = 0} = {}) {
55+
function filesize (arg, {
56+
bits = false,
57+
pad = false,
58+
base = -1,
59+
round = 2,
60+
locale = EMPTY,
61+
localeOptions = {},
62+
separator = EMPTY,
63+
spacer = SPACE,
64+
symbols = {},
65+
standard = EMPTY,
66+
output = STRING,
67+
fullform = false,
68+
fullforms = [],
69+
exponent = -1,
70+
roundingMethod = ROUND,
71+
precision = 0
72+
} = {}) {
5673
let e = exponent,
5774
num = Number(arg),
5875
result = [],
@@ -174,7 +191,12 @@ function filesize (arg, {bits = false, pad = false, base = -1, round = 2, locale
174191
}
175192

176193
// Returning Array, Object, or String (default)
177-
return output === ARRAY ? result : output === OBJECT ? {value: result[0], symbol: result[1], exponent: e, unit: u} : result.join(spacer);
194+
return output === ARRAY ? result : output === OBJECT ? {
195+
value: result[0],
196+
symbol: result[1],
197+
exponent: e,
198+
unit: u
199+
} : result.join(spacer);
178200
}
179201

180202
// Partial application for functional programming

lib/filesize.esm.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/filesize.esm.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/filesize.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* @copyright 2022 Jason Mulligan <[email protected]>
55
* @license BSD-3-Clause
6-
* @version 9.0.8
6+
* @version 9.0.9
77
*/
88
(function (global, factory) {
99
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :

lib/filesize.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)