Socket
Socket
Sign inDemoInstall

pretty-bytes

Package Overview
Dependencies
0
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.4.0 to 5.4.1

16

index.js

@@ -39,2 +39,14 @@ 'use strict';

const BIBIT_UNITS = [
'b',
'kibit',
'Mibit',
'Gibit',
'Tibit',
'Pibit',
'Eibit',
'Zibit',
'Yibit'
];
/*

@@ -63,3 +75,5 @@ Formats the given number using `Number#toLocaleString`.

options = Object.assign({bits: false, binary: false}, options);
const UNITS = options.bits ? (options.binary ? BIBYTE_UNITS : BIT_UNITS) : BYTE_UNITS;
const UNITS = options.bits ?
(options.binary ? BIBIT_UNITS : BIT_UNITS) :
(options.binary ? BIBYTE_UNITS : BYTE_UNITS);

@@ -66,0 +80,0 @@ if (options.signed && number === 0) {

2

package.json
{
"name": "pretty-bytes",
"version": "5.4.0",
"version": "5.4.1",
"description": "Convert bytes to a human readable string: 1337 → 1.34 kB",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc