# object-identity-map

> Map implementation based on object identity

Latest version **1.0.2** (published 2019-08-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install object-identity-map
pnpm add object-identity-map
yarn add object-identity-map
bun add object-identity-map
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-08-30 |
| First published | 2019-07-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Stephen Belanger |
| Maintainers | qard |

## Links

- npm: https://www.npmjs.com/package/object-identity-map
- Repository: https://github.com/Qard/object-identity-map
- Homepage: https://github.com/Qard/object-identity-map#readme
- Issues: https://github.com/Qard/object-identity-map/issues
- npm.io page: https://npm.io/package/object-identity-map

## Dependencies (1)

- [object.entries](https://npm.io/package/object.entries.md) ^1.1.0

## Recent versions

- 1.0.2 (latest) — 2019-08-30
- 1.0.1 — 2019-07-21
- 1.0.0 — 2019-07-11

## README

# object-identity-map

A subclass of `Map` based on object identity.
This allows objects that _look_ the same, but are
not the same reference, to map to the same value.

## Install

```sh
npm install object-identity-map
```

## Usage

```js
const ObjectIdentityMap = require('object-identity-map')

const map = new ObjectIdentityMap()

map.set({ foo: 'bar' }, true)

if (map.has({ foo: 'bar' })) {
  console.log(map.get({ foo: 'bar' }) === true)
}
```

---

### Copyright (c) 2019 Stephen Belanger

#### Licensed under MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---
_Source: https://npm.io/package/object-identity-map · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
