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

just-compare

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

just-compare - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

6

CHANGELOG.md
# just-compare
## 2.2.1
### Patch Changes
- Simplify typings #480
## 2.2.0

@@ -4,0 +10,0 @@

16

index.d.ts

@@ -1,17 +0,3 @@

// Definitions by: Justy Robles <https://github.com/justyrobles>
declare function compare(value1: unknown, value2: unknown): boolean;
type Primitive = boolean | string | number | bigint | null | undefined;
declare function compare<T extends Primitive>(value1: T, value2: T): boolean;
declare function compare<T1 extends object, T2 extends object & T1>(
value1: T1,
value2: T2
): boolean;
declare function compare<T1 extends object & T2, T2 extends object>(
value1: T1,
value2: T2
): boolean;
export default compare;

@@ -53,25 +53,1 @@ import compare from "./index";

compare();
// @ts-expect-error
compare(1, "1");
// @ts-expect-error
compare(["abc"], "abc");
// @ts-expect-error
compare({ a: 1, b: 2 }, [{ a: 1, b: 2 }]);
// @ts-expect-error
compare(obj2, obj1);
// @ts-expect-error
compare(obj1, obj2);
// @ts-expect-error
compare(obj1, num1);
// @ts-expect-error
compare(num1, obj1);
// @ts-expect-error
compare(NaN, "abc");
// @ts-expect-error
compare(funcA, funcB);
// @ts-expect-error
compare(funcA, true);
// @ts-expect-error
compare(num1, num2);
// @ts-expect-error
compare(num2, num1);
{
"name": "just-compare",
"version": "2.2.0",
"version": "2.2.1",
"description": "compare two collections",

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

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