New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@transloadit/prettier-bytes

Package Overview
Dependencies
Maintainers
4
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@transloadit/prettier-bytes - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

3

dist/prettierBytes.d.ts

@@ -1,1 +0,2 @@

export default function prettierBytes(num: number): string;
declare const _default: (num: number) => string;
export = _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function prettierBytes(num) {
module.exports = function prettierBytes(num) {
if (typeof num !== 'number' || Number.isNaN(num)) {

@@ -16,3 +15,3 @@ throw new TypeError(`Expected a number, got ${typeof num}`);

const exponent = Math.min(Math.floor(Math.log(num) / Math.log(1024)), units.length - 1);
num = Number(num / Math.pow(1024, exponent));
num = Number(num / 1024 ** exponent);
const unit = units[exponent];

@@ -23,4 +22,3 @@ if (num >= 10 || num % 1 === 0) {

return `${(neg ? '-' : '') + num.toFixed(1)} ${unit}`;
}
exports.default = prettierBytes;
};
//# sourceMappingURL=prettierBytes.js.map
{
"name": "@transloadit/prettier-bytes",
"version": "0.3.3",
"version": "0.3.4",
"repository": {

@@ -23,3 +23,3 @@ "type": "git",

},
"gitHead": "412a97c914bd1a8c6d21df01c9f7e18ab19b218a"
"gitHead": "714bbf75e54490ceb20bea49a728230668d456c1"
}

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