sindresorhus

hash-object

Get the hash of an object

by sindresorhus

JavaScript

JavaScript90.7%
TypeScript9.3%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
71
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template
transitive-bullshit

Hey hey 👋 Love this module, but it relies in which is not available in edge environments or browser. Here's a version which uses the web crypto API instead (gist), but since the web crypto API's is async, it requires to return a now instead. If you'd rather just focus on Node.js support, that's fine, but the readme mentions deterministic execution on node.js / browsers, so that should probably be changed to be Node.js-only. Otherwise, happy to submit a PR for a breaking change to update the package to use the web crypto version I linked to above. This was prompted by https://github.com/transitive-bullshit/agentic/issues/677

transitive-bullshit · 8mo ago
palashmon

When the hashObject function encounters circular references in the input object, it currently leads to a "maximum call stack size exceeded" error due to an infinite loop during the normalization process. This issue can result in unexpected behavior and a lack of graceful error handling for users. Steps to Reproduce: Proposed Solution: Implement a mechanism within the function to detect circular references and handle them gracefully. Upon encountering a circular reference, the function should throw a specific error message informing users about the issue.

palashmon · 2y ago
jjangga0214

Is hash-obj deterministic across any environment? I see it uses , so I guess it's deterministic, but just asking to make sure. If so, I think it'd be better to advertise the determinism on the readme. Thanks.

jjangga0214 · 3y ago
Structured data for AI agents

Repository: sindresorhus/hash-object. Description: Get the hash of an object Stars: 142, Forks: 11. Primary language: JavaScript. Languages: JavaScript (90.7%), TypeScript (9.3%). License: MIT. Latest release: v5.1.0 (8mo ago). Open PRs: 0, open issues: 0. Last activity: 8mo ago. Community health: 71%. Top contributors: sindresorhus, BendingBender, Richienb.