Socket
Socket
Sign inDemoInstall

8bits

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

8bits - npm Package Compare versions

Comparing version 0.2.7 to 0.2.8

2

index.js

@@ -54,3 +54,3 @@ 'use strict';

if (config.minSigFigs && value.toString().replace('.', '').length < config.minSigFigs){
if (config.minSigFigs && value.toString().replace('.', '').length <= config.minSigFigs){
value = value.toPrecision(config.minSigFigs);

@@ -57,0 +57,0 @@ } else if (value > 1 || unit !== 'B') {

{
"name": "8bits",
"version": "0.2.7",
"version": "0.2.8",
"description": "A Javascript library for manipulating and converting byte values",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -96,2 +96,6 @@ 'use strict';

expect(byte(1024, { minSigFigs: 3, from: 'MB', to: 'B' })).to.equal('1024000000 B');
expect(byte(450000000000, { minSigFigs: 2 })).to.equal('450 GB');
expect(byte(45000000000, { minSigFigs: 2 })).to.equal('45 GB');
expect(byte(4500000000, { minSigFigs: 2 })).to.equal('4.5 GB');
});
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