moh-hasher 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +4 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -51,3 +51,7 @@ export function unhash(encodedSecret) {
51
51
  }
52
52
  return decoded;
53
53
  }
54
+
55
+ export function compare(original, hashed) {
56
+ return hash(original) === hashed;
57
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moh-hasher",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A simple encoding and decoding package with unique hashes",
5
5
  "main": "index.js",
6
6
  "type": "module",