just-compare
Advanced tools
Comparing version 2.2.0 to 2.2.1
# just-compare | ||
## 2.2.1 | ||
### Patch Changes | ||
- Simplify typings #480 | ||
## 2.2.0 | ||
@@ -4,0 +10,0 @@ |
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9112
203