Skip to content

Commit bb72429

Browse files
committed
Fixing assignment of standard such that it aligns with the README (default of "iec") & updating tests, fixing hardcoded copyright year in rollup.config.js, version bump to release
1 parent 9633cda commit bb72429

14 files changed

+34
-32
lines changed

lib/filesize.es6.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* @copyright 2021 Jason Mulligan <[email protected]>
55
* @license BSD-3-Clause
6-
* @version 8.0.0
6+
* @version 8.0.1
77
*/
88
(function (global, factory) {
99
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -58,7 +58,7 @@
5858
separator = descriptor.separator !== void 0 ? descriptor.separator : "";
5959
spacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? "" : " ";
6060
symbols = descriptor.symbols || {};
61-
standard = base === 2 ? descriptor.standard || "iec" : "jedec";
61+
standard = descriptor.standard in symbol ? descriptor.standard : "iec";
6262
output = descriptor.output || "string";
6363
full = descriptor.fullform === true;
6464
fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];

lib/filesize.es6.min.js

+3-3
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* @copyright 2021 Jason Mulligan <[email protected]>
55
* @license BSD-3-Clause
6-
* @version 8.0.0
6+
* @version 8.0.1
77
*/
88
const b = /^(b|B)$/,
99
symbol = {
@@ -52,7 +52,7 @@ function filesize (arg, descriptor = {}) {
5252
separator = descriptor.separator !== void 0 ? descriptor.separator : "";
5353
spacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? "" : " ";
5454
symbols = descriptor.symbols || {};
55-
standard = base === 2 ? descriptor.standard || "iec" : "jedec";
55+
standard = descriptor.standard in symbol ? descriptor.standard : "iec";
5656
output = descriptor.output || "string";
5757
full = descriptor.fullform === true;
5858
fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];

lib/filesize.esm.min.js

+3-3
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* @copyright 2021 Jason Mulligan <[email protected]>
55
* @license BSD-3-Clause
6-
* @version 8.0.0
6+
* @version 8.0.1
77
*/
88
(function (global, factory) {
99
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -79,7 +79,7 @@
7979
separator = descriptor.separator !== void 0 ? descriptor.separator : "";
8080
spacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? "" : " ";
8181
symbols = descriptor.symbols || {};
82-
standard = base === 2 ? descriptor.standard || "iec" : "jedec";
82+
standard = descriptor.standard in symbol ? descriptor.standard : "iec";
8383
output = descriptor.output || "string";
8484
full = descriptor.fullform === true;
8585
fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];

lib/filesize.min.js

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

0 commit comments

Comments
 (0)