GitShow/sindresorhus/hash-object
sindresorhus

hash-object

Get the hash of an object

by sindresorhus
Star on GitHubForknpm

JavaScript

141 stars11 forks4 contributorsQuiet · 6mo agoSince 2015v5.1.0MIT

Meet the team

See all 4 on GitHub →
sindresorhus
sindresorhus18 contributions
BendingBender
BendingBender1 contribution
Richienb
Richienb1 contribution

Languages

View on GitHub →
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

Recent fixes

View closed PRs →
transitive-bullshit
Support for non-node.js environmentsClosedIssue

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 · 6mo ago
palashmon
Handling Circular References in `hashObject` FunctionClosedIssue

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 this deterministic?ClosedIssue

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: 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.

·@ofershap

Replace github.com with gitshow.dev