Comparing version 2.0.7 to 2.0.8
@@ -1,8 +0,2 @@ | ||
/** | ||
* Compare two objects using reference equality and stable deep hashing. | ||
* @param {any} object1 First object | ||
* @param {any} object2 Second object | ||
* @return {boolean} true if equal and false if not | ||
*/ | ||
declare function isEqual(object1: any, object2: any): boolean; | ||
export { i as isEqual } from '../shared/ohash.CMR0vuBX.js'; | ||
@@ -37,2 +31,2 @@ /** | ||
export { diff, isEqual }; | ||
export { diff }; |
{ | ||
"name": "ohash", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "Simple object hashing, serialization and comparison utils.", | ||
@@ -5,0 +5,0 @@ "repository": "unjs/ohash", |
@@ -30,8 +30,8 @@ # #️ ohash | ||
// ESM import | ||
import { hash, serialize, digest } from "ohash"; | ||
import { isEqual, diff } from "ohash/utils"; | ||
import { hash, serialize, digest, isEqual } from "ohash"; | ||
import { diff } from "ohash/utils"; | ||
// Dynamic import | ||
const { hash, serialize, digest } = await import("ohash"); | ||
const { isEqual, diff } = await import("ohash/utils"); | ||
const { hash, serialize, digest, isEqual } = await import("ohash"); | ||
const { diff } = await import("ohash/utils"); | ||
``` | ||
@@ -43,8 +43,10 @@ | ||
```js | ||
import { hash, serialize, digest } from "https://esm.sh/ohash"; | ||
import { isEqual, diff } from "https://esm.sh/ohash/utils"; | ||
import { hash, serialize, digest, isEqual } from "https://esm.sh/ohash"; | ||
import { diff } from "https://esm.sh/ohash/utils"; | ||
// Dynamic import | ||
const { hash, serialize, digest } = await import("https://esm.sh/ohash"); | ||
const { isEqual, diff } = await import("https://esm.sh/ohash/utils"); | ||
const { hash, serialize, digest, isEqual } = await import( | ||
"https://esm.sh/ohash" | ||
); | ||
const { diff } = await import("https://esm.sh/ohash/utils"); | ||
``` | ||
@@ -71,4 +73,3 @@ | ||
> [!IMPORTANT] | ||
> `serialize` method uses best efforts to generate stable serialized values; however, it is not designed for security purposes. Keep in mind that there is always a chance of intentional collisions caused by user input. | ||
> [!IMPORTANT] > `serialize` method uses best efforts to generate stable serialized values; however, it is not designed for security purposes. Keep in mind that there is always a chance of intentional collisions caused by user input. | ||
@@ -98,3 +99,3 @@ ```js | ||
```js | ||
import { isEqual } from "ohash/utils"; | ||
import { isEqual } from "ohash"; | ||
@@ -101,0 +102,0 @@ // true |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
19709
15
172
150