Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tsmx/human-readable

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsmx/human-readable - npm Package Compare versions

Comparing version 1.0.9 to 2.0.0

3

.eslintrc.json

@@ -5,3 +5,4 @@ {

"commonjs": true,
"es6": true
"es6": true,
"jest": true
},

@@ -8,0 +9,0 @@ "extends": "eslint:recommended",

@@ -14,3 +14,3 @@ declare module "@tsmx/human-readable";

export function calcFromTo(
export function fromTo(
bytes: number,

@@ -17,0 +17,0 @@ fromSize: HRSizeType,

{
"name": "@tsmx/human-readable",
"version": "1.0.9",
"version": "2.0.0",
"description": "Easily create human-readable strings from byte sizes, e.g. 17238 --> 17.24 kB. Supports decimal (MB,GB,..) and binary (MiB, GiB,..) units as well as user-defined conversion from/to other sizes.",

@@ -35,3 +35,4 @@ "main": "human-readable.js",

"devDependencies": {
"jest": "^27.2.0",
"eslint": "^8.41.0",
"jest": "^29.5.0",
"tsd": "^0.21.0"

@@ -38,0 +39,0 @@ },

@@ -65,3 +65,3 @@ describe('human-readable conversion test suite for decimal and IEC units', () => {

const hr = require('../human-readable');
sizes = hr.availableSizes();
const sizes = hr.availableSizes();
expect(Array.isArray(sizes)).toBeTruthy();

@@ -68,0 +68,0 @@ expect(sizes.length).toBe(6);

import { expectType } from 'tsd';
import { availableSizes, fromBytes, calcFromTo, HROptionsType } from '../human-readable';
import { availableSizes, fromBytes, fromTo, HROptionsType } from '../human-readable';

@@ -13,2 +13,2 @@ const testOptions: HROptionsType = {

expectType<string>(calcFromTo(1024, 'KBYTE', 'MBYTE', undefined));
expectType<string>(fromTo(1024, 'KBYTE', 'MBYTE', undefined));

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