Skip to content

Commit

Permalink
Updating lock file, updating changelog, version bump to release & bui…
Browse files Browse the repository at this point in the history
…lding outputs
  • Loading branch information
avoidwork committed Aug 18, 2021
1 parent b2ec833 commit 9633cda
Show file tree
Hide file tree
Showing 12 changed files with 412 additions and 407 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [7.0.0](https://github.com//avoidwork/filesize.js.git/compare/7.0.0...7.0.0)
#### [8.0.0](https://github.com//avoidwork/filesize.js.git/compare/7.0.0...8.0.0)

- Make SI and IEC standards defaults [`#138`](https://github.com//avoidwork/filesize.js.git/pull/138)
- Update symbols for bits to "bit" [`#136`](https://github.com//avoidwork/filesize.js.git/pull/136)
- Make SI and IEC standards defaults [`#137`](https://github.com//avoidwork/filesize.js.git/issues/137)
- Updating CHANGELOG.md [`f89b102`](https://github.com//avoidwork/filesize.js.git/commit/f89b1025ae9eb33025032c58592410c49488cb77)

### [7.0.0](https://github.com//avoidwork/filesize.js.git/compare/6.4.0...7.0.0)

Expand Down
14 changes: 7 additions & 7 deletions lib/filesize.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @copyright 2021 Jason Mulligan <[email protected]>
* @license BSD-3-Clause
* @version 7.0.0
* @version 8.0.0
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
Expand All @@ -14,11 +14,11 @@
const b = /^(b|B)$/,
symbol = {
iec: {
bits: ["b", "Kib", "Mib", "Gib", "Tib", "Pib", "Eib", "Zib", "Yib"],
bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"],
bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
},
jedec: {
bits: ["b", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"],
bits: ["bit", "Kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"],
bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
}
},
Expand Down Expand Up @@ -51,14 +51,14 @@
bits = descriptor.bits === true;
unix = descriptor.unix === true;
pad = descriptor.pad === true;
base = descriptor.base || 2;
base = descriptor.base || 10;
round = descriptor.round !== void 0 ? descriptor.round : unix ? 1 : 2;
locale = descriptor.locale !== void 0 ? descriptor.locale : "";
localeOptions = descriptor.localeOptions || {};
separator = descriptor.separator !== void 0 ? descriptor.separator : "";
spacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? "" : " ";
symbols = descriptor.symbols || {};
standard = base === 2 ? descriptor.standard || "jedec" : "jedec";
standard = base === 2 ? descriptor.standard || "iec" : "jedec";
output = descriptor.output || "string";
full = descriptor.fullform === true;
fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];
Expand Down Expand Up @@ -120,10 +120,10 @@
e++;
}

u = result[1] = base === 10 && e === 1 ? bits ? "kb" : "kB" : symbol[standard][bits ? "bits" : "bytes"][e];
u = result[1] = base === 10 && e === 1 ? bits ? "kbit" : "kB" : symbol[standard][bits ? "bits" : "bytes"][e];

if (unix) {
result[1] = standard === "jedec" ? result[1].charAt(0) : e > 0 ? result[1].replace(/B$/, "") : result[1];
result[1] = result[1].charAt(0);

if (b.test(result[1])) {
result[0] = Math.floor(result[0]);
Expand Down
4 changes: 2 additions & 2 deletions lib/filesize.es6.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/filesize.es6.min.js.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions lib/filesize.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
*
* @copyright 2021 Jason Mulligan <[email protected]>
* @license BSD-3-Clause
* @version 7.0.0
* @version 8.0.0
*/
const b = /^(b|B)$/,
symbol = {
iec: {
bits: ["b", "Kib", "Mib", "Gib", "Tib", "Pib", "Eib", "Zib", "Yib"],
bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"],
bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
},
jedec: {
bits: ["b", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"],
bits: ["bit", "Kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"],
bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
}
},
Expand Down Expand Up @@ -45,14 +45,14 @@ function filesize (arg, descriptor = {}) {
bits = descriptor.bits === true;
unix = descriptor.unix === true;
pad = descriptor.pad === true;
base = descriptor.base || 2;
base = descriptor.base || 10;
round = descriptor.round !== void 0 ? descriptor.round : unix ? 1 : 2;
locale = descriptor.locale !== void 0 ? descriptor.locale : "";
localeOptions = descriptor.localeOptions || {};
separator = descriptor.separator !== void 0 ? descriptor.separator : "";
spacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? "" : " ";
symbols = descriptor.symbols || {};
standard = base === 2 ? descriptor.standard || "jedec" : "jedec";
standard = base === 2 ? descriptor.standard || "iec" : "jedec";
output = descriptor.output || "string";
full = descriptor.fullform === true;
fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];
Expand Down Expand Up @@ -114,10 +114,10 @@ function filesize (arg, descriptor = {}) {
e++;
}

u = result[1] = base === 10 && e === 1 ? bits ? "kb" : "kB" : symbol[standard][bits ? "bits" : "bytes"][e];
u = result[1] = base === 10 && e === 1 ? bits ? "kbit" : "kB" : symbol[standard][bits ? "bits" : "bytes"][e];

if (unix) {
result[1] = standard === "jedec" ? result[1].charAt(0) : e > 0 ? result[1].replace(/B$/, "") : result[1];
result[1] = result[1].charAt(0);

if (b.test(result[1])) {
result[0] = Math.floor(result[0]);
Expand Down Expand Up @@ -168,4 +168,4 @@ function filesize (arg, descriptor = {}) {
// Partial application for functional programming
filesize.partial = opt => arg => filesize(arg, opt);

export default filesize;
export { filesize as default };
4 changes: 2 additions & 2 deletions lib/filesize.esm.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9633cda

Please sign in to comment.