Last 12 weeks · 0 commits
4 of 6 standards met
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
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.
Repository: sindresorhus/hash-object. Description: Get the hash of an object Stars: 141, Forks: 11. Primary language: JavaScript. Languages: JavaScript (90.7%), TypeScript (9.3%). License: MIT. Latest release: v5.1.0 (6mo ago). Open PRs: 0, open issues: 0. Last activity: 6mo ago. Community health: 71%. Top contributors: sindresorhus, BendingBender, Richienb.