-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing deprecated
suffixes
option with a major version bump, upda…
…ting README & LICENSE copyrights, updating dev dependencies
- Loading branch information
Showing
15 changed files
with
4,992 additions
and
2,182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,8 @@ | |
/test/ | ||
.idea | ||
.eslintrc | ||
.gitignore | ||
.travis.yml | ||
Gruntfile.js | ||
bower.json | ||
composer.json | ||
Gruntfile.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
language: node_js | ||
node_js: | ||
- node | ||
- 10 | ||
- 9 | ||
- 8 | ||
- 7 | ||
- 6 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/** | ||
* filesize | ||
* | ||
* @copyright 2018 Jason Mulligan <[email protected]> | ||
* @copyright 2019 Jason Mulligan <[email protected]> | ||
* @license BSD-3-Clause | ||
* @version 3.6.1 | ||
* @version 4.0.0 | ||
*/ | ||
(function (global) { | ||
const b = /^(b|B)$/, | ||
|
@@ -45,7 +45,7 @@ | |
round = descriptor.round !== void 0 ? descriptor.round : unix ? 1 : 2; | ||
separator = descriptor.separator !== void 0 ? descriptor.separator || "" : ""; | ||
spacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? "" : " "; | ||
symbols = descriptor.symbols || descriptor.suffixes || {}; | ||
symbols = descriptor.symbols || {}; | ||
standard = base === 2 ? descriptor.standard || "jedec" : "jedec"; | ||
output = descriptor.output || "string"; | ||
full = descriptor.fullform === true; | ||
|
@@ -121,7 +121,7 @@ | |
} | ||
|
||
if (output === "object") { | ||
return {value: result[0], suffix: result[1], symbol: result[1]}; | ||
return {value: result[0], symbol: result[1]}; | ||
} | ||
|
||
if (full) { | ||
|
@@ -141,10 +141,8 @@ | |
// CommonJS, AMD, script tag | ||
if (typeof exports !== "undefined") { | ||
module.exports = filesize; | ||
} else if (typeof define === "function" && define.amd) { | ||
define(() => { | ||
return filesize; | ||
}); | ||
} else if (typeof define === "function" && define.amd !== void 0) { | ||
define(() => filesize); | ||
} else { | ||
global.filesize = filesize; | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ | |
/** | ||
* filesize | ||
* | ||
* @copyright 2018 Jason Mulligan <[email protected]> | ||
* @copyright 2019 Jason Mulligan <[email protected]> | ||
* @license BSD-3-Clause | ||
* @version 3.6.1 | ||
* @version 4.0.0 | ||
*/ | ||
(function (global) { | ||
var b = /^(b|B)$/, | ||
|
@@ -63,7 +63,7 @@ | |
round = descriptor.round !== void 0 ? descriptor.round : unix ? 1 : 2; | ||
separator = descriptor.separator !== void 0 ? descriptor.separator || "" : ""; | ||
spacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? "" : " "; | ||
symbols = descriptor.symbols || descriptor.suffixes || {}; | ||
symbols = descriptor.symbols || {}; | ||
standard = base === 2 ? descriptor.standard || "jedec" : "jedec"; | ||
output = descriptor.output || "string"; | ||
full = descriptor.fullform === true; | ||
|
@@ -139,7 +139,7 @@ | |
} | ||
|
||
if (output === "object") { | ||
return { value: result[0], suffix: result[1], symbol: result[1] }; | ||
return { value: result[0], symbol: result[1] }; | ||
} | ||
|
||
if (full) { | ||
|
@@ -163,7 +163,7 @@ | |
// CommonJS, AMD, script tag | ||
if (typeof exports !== "undefined") { | ||
module.exports = filesize; | ||
} else if (typeof define === "function" && define.amd) { | ||
} else if (typeof define === "function" && define.amd !== void 0) { | ||
define(function () { | ||
return filesize; | ||
}); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.