Skip to content

Commit 70bb6a1

Browse files
committed
Fixing unit assignment (WIP)
1 parent c798056 commit 70bb6a1

10 files changed

+18
-18
lines changed

lib/filesize.es6.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@
4646
// Sync base & standard
4747
if (base === -1 && standard.length === 0) {
4848
base = 10;
49-
standard = "iec";
49+
standard = "jedec";
5050
} else if (base === -1 && standard.length > 0) {
5151
standard = standard === "iec" ? "iec" : "jedec";
52-
base = standard === "iec" ? 10 : 2;
52+
base = standard === "iec" ? 2 : 10;
5353
} else {
5454
base = base === 2 ? 2 : 10;
55-
standard = base === 10 ? "iec" : "jedec";
55+
standard = base === 10 ? "jedec" : "iec";
5656
}
5757

5858
const ceil = base === 10 ? 1000 : 1024,

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ function filesize (arg, {bits = false, pad = false, base = -1, round = 2, locale
4040
// Sync base & standard
4141
if (base === -1 && standard.length === 0) {
4242
base = 10;
43-
standard = "iec";
43+
standard = "jedec";
4444
} else if (base === -1 && standard.length > 0) {
4545
standard = standard === "iec" ? "iec" : "jedec";
46-
base = standard === "iec" ? 10 : 2;
46+
base = standard === "iec" ? 2 : 10;
4747
} else {
4848
base = base === 2 ? 2 : 10;
49-
standard = base === 10 ? "iec" : "jedec";
49+
standard = base === 10 ? "jedec" : "iec";
5050
}
5151

5252
const ceil = base === 10 ? 1000 : 1024,

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@
8080

8181
if (base === -1 && standard.length === 0) {
8282
base = 10;
83-
standard = "iec";
83+
standard = "jedec";
8484
} else if (base === -1 && standard.length > 0) {
8585
standard = standard === "iec" ? "iec" : "jedec";
86-
base = standard === "iec" ? 10 : 2;
86+
base = standard === "iec" ? 2 : 10;
8787
} else {
8888
base = base === 2 ? 2 : 10;
89-
standard = base === 10 ? "iec" : "jedec";
89+
standard = base === 10 ? "jedec" : "iec";
9090
}
9191

9292
var ceil = base === 10 ? 1000 : 1024,

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)