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

@parca/utilities

Package Overview
Dependencies
Maintainers
0
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parca/utilities - npm Package Compare versions

Comparing version 0.0.84 to 0.0.85

4

CHANGELOG.md

@@ -6,2 +6,6 @@ # Change Log

## [0.0.85](https://github.com/parca-dev/parca/compare/@parca/utilities@0.0.84...@parca/utilities@0.0.85) (2024-07-29)
**Note:** Version bump only for package @parca/utilities
## 0.0.84 (2024-07-29)

@@ -8,0 +12,0 @@

1

dist/index.d.ts

@@ -38,3 +38,2 @@ import { Label } from '@parca/client';

export declare const diffColor: (diff: bigint, cumulative: bigint, isDarkMode: boolean) => string;
export declare const diffColorPerSecond: (diff: number, cumulative: number, isDarkMode: boolean) => string;
export declare const isSearchMatch: (currentSearchString: string | undefined, name: string) => boolean;

@@ -41,0 +40,0 @@ export declare const saveAsBlob: (blob: Blob, filename: string) => void;

@@ -242,8 +242,2 @@ // Copyright 2022 The Parca Authors

};
export const diffColorPerSecond = (diff, cumulative, isDarkMode) => {
const prevValue = cumulative - diff;
const diffRatio = prevValue > 0 ? (diff !== 0 ? diff / prevValue : 0) : 1.0;
const hasDiff = Math.abs(diffRatio) > DIFF_RATIO_THRESHOLD;
return diffColorRatio(hasDiff, diffRatio, isDarkMode);
};
const diffColorRatio = (hasDiff, diffRatio, isDarkMode) => {

@@ -250,0 +244,0 @@ const diffTransparency = hasDiff ? Math.min((Math.abs(diffRatio) / 2 + 0.5) * 0.8, 0.8) : 0;

{
"name": "@parca/utilities",
"version": "0.0.84",
"version": "0.0.85",
"description": "A set of reusable functions for Parca",

@@ -28,3 +28,3 @@ "main": "dist/index.js",

},
"gitHead": "42342c1a093040c94a83beb1161beedcaa2f8580"
"gitHead": "cdd20a679a256fa717088741fb9065eaec99c2d3"
}

@@ -329,14 +329,2 @@ // Copyright 2022 The Parca Authors

export const diffColorPerSecond = (
diff: number,
cumulative: number,
isDarkMode: boolean
): string => {
const prevValue = cumulative - diff;
const diffRatio = prevValue > 0 ? (diff !== 0 ? diff / prevValue : 0) : 1.0;
const hasDiff = Math.abs(diffRatio) > DIFF_RATIO_THRESHOLD;
return diffColorRatio(hasDiff, diffRatio, isDarkMode);
};
const diffColorRatio = (hasDiff: boolean, diffRatio: number, isDarkMode: boolean): string => {

@@ -343,0 +331,0 @@ const diffTransparency = hasDiff ? Math.min((Math.abs(diffRatio) / 2 + 0.5) * 0.8, 0.8) : 0;

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