Skip to content

Commit

Permalink
chore: organize src dir
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 13, 2025
1 parent 37fe050 commit c94e04a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/hash.ts → src/hash/hash.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
File renamed without changes.
13 changes: 9 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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";
2 changes: 1 addition & 1 deletion src/diff.ts → src/utils/diff.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts → src/utils/is-equal.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit c94e04a

Please sign in to comment.