object-identity



npm add object-identity hashes objects

downloads size size

## ⚡ Features - ✅ **Intuitive** - 🌊 **Recursive/Circular support** - 🏎 **Performant** — _TBD benchmarks_ - ðŸŠķ **Lightweight** — a mere 503B and no [dependencies](https://npm.anvaka.com/#/view/2d/object-identity/). ## 🚀 Usage ```ts import { createHash } from 'node:crypto'; import { identify } from 'object-identity'; // ~> Some user defined hasher const hasher = (value) => createHash('sha1').update(value).digest('hex'); // Lets hash the object const hashA = identify({ a: "b" }, hasher); const hashB = identify({ a: "b" }, hasher); expect(hashA).toEqual(hashB); ``` ## License MIT ÂĐ [Marais Rossouw](https://marais.io)