Skip to content

Commit 286d882

Browse files
outslept43081j
andauthored
feat: add object-hash to the docs and manifest (#246)
* feat: add `object-hash` to the docs and manifest * chore: `Project Page` -> `Documentation Page` * chore: remove extra space * fix: add `object-hash` to the list of modules * Update docs/modules/object-hash.md Co-authored-by: James Garbutt <43081j@users.noreply.github.com> --------- Co-authored-by: James Garbutt <43081j@users.noreply.github.com>
1 parent 2bbe1bd commit 286d882

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

docs/modules/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ ESLint plugin.
2222
- [`cpx`](./cpx.md)
2323
- [`deep-equal`](./deep-equal.md)
2424
- [`depcheck`](./depcheck.md)
25-
- [`dotenv`](./dotenv.md)
2625
- [`dot-prop`](./dot-prop.md)
26+
- [`dotenv`](./dotenv.md)
2727
- [`emoji-regex`](./emoji-regex.md)
2828
- [`eslint-plugin-es`](./eslint-plugin-es.md)
2929
- [`eslint-plugin-eslint-comments`](./eslint-plugin-eslint-comments.md)
@@ -47,14 +47,15 @@ ESLint plugin.
4747
- [`jsx-ast-utils`](./jsx-ast-utils.md)
4848
- [`lint-staged`](./lint-staged.md)
4949
- [`lodash`, `underscore` and related](./lodash-underscore.md)
50-
- [`MaterializeCSS`](./materialize-css.md)
5150
- [`make-dir`](./mkdirp.md)
51+
- [`MaterializeCSS`](./materialize-css.md)
5252
- [`md5`](./md5.md)
5353
- [`mkdirp`](./mkdirp.md)
5454
- [`moment.js`](./momentjs.md)
5555
- [`npm-run-all`](./npm-run-all.md)
56-
- [`path-exists`](./path-exists.md)
56+
- [`object-hash`](./object-hash.md)
5757
- [`ora`](./ora.md)
58+
- [`path-exists`](./path-exists.md)
5859
- [`qs`](./qs.md)
5960
- [`readable-stream`](./readable-stream.md)
6061
- [`rimraf`](./rimraf.md)

docs/modules/object-hash.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# object-hash
2+
3+
Generate hashes from objects and values in Node and the browser. Note: the project is largely unmaintained.
4+
5+
## Alternatives
6+
7+
### `ohash`
8+
9+
Actively maintained utilities for hashing, serialization, equality, and diffs. Uses stable serialization plus SHA-256 (Base64URL). Serialization was originally based on object-hash.
10+
11+
[Project Page](https://github.com/unjs/ohash)
12+
13+
[npm](https://www.npmjs.com/package/ohash)
14+
15+
### Web Crypto
16+
17+
Use the standard [`SubtleCrypto.digest`](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest) API available in the runtimes. Pair it with a stable serializer (e.g., [`safe-stable-stringify`](https://github.com/BridgeAR/safe-stable-stringify)) to deterministically hash objects.
18+
19+
### `Bun.CryptoHasher` (built-in)
20+
21+
Bun’s native incremental hasher (e.g., sha256). Combine with a stable serializer for object hashing. For fast non-crypto fingerprints, see [`Bun.hash`](https://bun.com/reference/bun/hash).
22+
23+
[Documentation Page](https://bun.com/reference/bun/CryptoHasher)

manifests/preferred.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,6 +2214,12 @@
22142214
"docPath": "npm-run-all",
22152215
"category": "preferred"
22162216
},
2217+
{
2218+
"type": "documented",
2219+
"moduleName": "object-hash",
2220+
"docPath": "object-hash",
2221+
"category": "preferred"
2222+
},
22172223
{
22182224
"type": "documented",
22192225
"moduleName": "object-path",

0 commit comments

Comments
 (0)