diff --git a/src/hash.ts b/src/hash/hash.ts similarity index 90% rename from src/hash.ts rename to src/hash/hash.ts index b6a3186..199fb2d 100644 --- a/src/hash.ts +++ b/src/hash/hash.ts @@ -1,5 +1,5 @@ import { objectHash, HashOptions } from "./object-hash"; -import { sha256base64 } from "./crypto/sha256"; +import { sha256base64 } from "../crypto/sha256"; /** * Hash any JS value into a string diff --git a/src/object-hash.ts b/src/hash/object-hash.ts similarity index 100% rename from src/object-hash.ts rename to src/hash/object-hash.ts diff --git a/src/index.ts b/src/index.ts index bde8db8..3768d77 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,11 @@ -export { objectHash } from "./object-hash"; -export { hash } from "./hash"; +// Hash +export { objectHash } from "./hash/object-hash"; +export { hash } from "./hash/hash"; + +// Crypto export { murmurHash } from "./crypto/murmur"; export { sha256, sha256base64 } from "./crypto/sha256"; -export { isEqual } from "./utils"; -export { diff } from "./diff"; + +// Utils +export { isEqual } from "./utils/is-equal"; +export { diff } from "./utils/diff"; diff --git a/src/diff.ts b/src/utils/diff.ts similarity index 97% rename from src/diff.ts rename to src/utils/diff.ts index d0dc7a8..2f4928c 100644 --- a/src/diff.ts +++ b/src/utils/diff.ts @@ -1,4 +1,4 @@ -import { objectHash, HashOptions } from "./object-hash"; +import { objectHash, HashOptions } from "../hash/object-hash"; /** * Calculates the difference between two objects and returns a list of differences. diff --git a/src/utils.ts b/src/utils/is-equal.ts similarity index 90% rename from src/utils.ts rename to src/utils/is-equal.ts index 00be2fc..e8de138 100644 --- a/src/utils.ts +++ b/src/utils/is-equal.ts @@ -1,4 +1,4 @@ -import { objectHash, HashOptions } from "./object-hash"; +import { objectHash, HashOptions } from "../hash/object-hash"; /** * Compare two objects using reference equality and stable deep hashing. * @param {any} object1 First object