Socket
Socket
Sign inDemoInstall

filesize

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filesize - npm Package Compare versions

Comparing version 3.5.11 to 3.6.0

16

lib/filesize.js

@@ -6,5 +6,5 @@ "use strict";

*
* @copyright 2017 Jason Mulligan <jason.mulligan@avoidwork.com>
* @copyright 2018 Jason Mulligan <jason.mulligan@avoidwork.com>
* @license BSD-3-Clause
* @version 3.5.11
* @version 3.6.0
*/

@@ -52,2 +52,3 @@ (function (global) {

unix = void 0,
separator = void 0,
spacer = void 0,

@@ -64,4 +65,5 @@ standard = void 0,

base = descriptor.base || 2;
round = descriptor.round !== undefined ? descriptor.round : unix ? 1 : 2;
spacer = descriptor.spacer !== undefined ? descriptor.spacer : unix ? "" : " ";
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 || {};

@@ -72,3 +74,3 @@ standard = base === 2 ? descriptor.standard || "jedec" : "jedec";

fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];
e = descriptor.exponent !== undefined ? descriptor.exponent : -1;
e = descriptor.exponent !== void 0 ? descriptor.exponent : -1;
num = Number(arg);

@@ -151,2 +153,6 @@ neg = num < 0;

if (separator.length > 0) {
result[0] = result[0].toString().replace(".", separator);
}
return result.join(spacer);

@@ -153,0 +159,0 @@ }

{
"name": "filesize",
"description": "JavaScript library to generate a human readable String describing the file size",
"version": "3.5.11",
"version": "3.6.0",
"homepage": "https://filesizejs.com",

@@ -25,3 +25,3 @@ "author": "Jason Mulligan <jason.mulligan@avoidwork.com>",

"babel-preset-env": "^1.6.1",
"babel-minify": "^0.2.0",
"babel-minify": "^0.3.0",
"grunt": "^1.0.1",

@@ -32,3 +32,3 @@ "grunt-babel": "^7.0.0",

"grunt-contrib-nodeunit": "^1.0.0",
"grunt-contrib-uglify": "^3.1.0",
"grunt-contrib-uglify": "^3.3.0",
"grunt-contrib-watch": "^1.0.0",

@@ -35,0 +35,0 @@ "grunt-eslint": "^20.1.0"

@@ -32,2 +32,5 @@ # filesize.js

### separator
_*(string)*_ Decimal separator charactor, default is `.`
### spacer

@@ -65,2 +68,3 @@ _*(string)*_ Character between the `result` and `suffix`, default is `" "`

filesize(12, {fullform: true, fullforms: ["байтов"]}); // "12 байтов"
filesize(265318, {separator: ","}); // "259,1 KB"
```

@@ -83,3 +87,3 @@

## License
Copyright (c) 2017 Jason Mulligan
Copyright (c) 2018 Jason Mulligan
Licensed under the BSD-3 license.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc