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.1.5 to 3.1.6

0

bower.json

@@ -0,0 +0,0 @@ {

12

lib/filesize.es6.js
/**
* filesize
*
* @copyright 2015 Jason Mulligan <jason.mulligan@avoidwork.com>
* @copyright 2016 Jason Mulligan <jason.mulligan@avoidwork.com>
* @license BSD-3-Clause
* @version 3.1.5
* @version 3.1.6
*/

@@ -11,4 +11,4 @@ (function (global) {

const si = {
bits: ["b", "kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"],
bytes: ["B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
bits: ["b", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"],
bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
};

@@ -78,3 +78,3 @@

result[0] = Number(val.toFixed(e > 0 ? round : 0));
result[1] = si[bits ? "bits" : "bytes"][e];
result[1] = base === 10 && e === 1 ? bits ? "kb" : "kB" : si[bits ? "bits" : "bytes"][e];

@@ -87,4 +87,2 @@ if (!skip && unix) {

result[1] = "";
} else if (!bits && result[1] === "k") {
result[1] = "K";
}

@@ -91,0 +89,0 @@ }

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

*
* @copyright 2015 Jason Mulligan <jason.mulligan@avoidwork.com>
* @copyright 2016 Jason Mulligan <jason.mulligan@avoidwork.com>
* @license BSD-3-Clause
* @version 3.1.5
* @version 3.1.6
*/

@@ -14,4 +14,4 @@ (function (global) {

var si = {
bits: ["b", "kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"],
bytes: ["B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
bits: ["b", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"],
bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
};

@@ -93,3 +93,3 @@

result[0] = Number(val.toFixed(e > 0 ? round : 0));
result[1] = si[bits ? "bits" : "bytes"][e];
result[1] = base === 10 && e === 1 ? bits ? "kb" : "kB" : si[bits ? "bits" : "bytes"][e];

@@ -102,4 +102,2 @@ if (!skip && unix) {

result[1] = "";
} else if (!bits && result[1] === "k") {
result[1] = "K";
}

@@ -106,0 +104,0 @@ }

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

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

@@ -0,0 +0,0 @@ # filesize.js

Sorry, the diff of this file is not supported yet

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