# @agoric/store

> Wrapper for JavaScript map

Latest version **0.10.0** (published 2026-04-08) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @agoric/store
pnpm add @agoric/store
yarn add @agoric/store
bun add @agoric/store
```

## Health

**Score 55/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.10.0 |
| Published | 2026-04-08 |
| First published | 2020-02-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | ^20.9 \|\| ^22.11 |
| Dependencies | 5 |
| Unpacked size | 67.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 357 |
| Author | Agoric |
| Maintainers | warner, erights, mhofman, michaelfig, kriskowal, agoricbot, mujahidkay, gibson042, jimlarson, samsiegart |
| Keywords | map |

## Links

- npm: https://www.npmjs.com/package/@agoric/store
- Repository: https://github.com/Agoric/agoric-sdk
- Homepage: https://github.com/Agoric/agoric-sdk#readme
- Issues: https://github.com/Agoric/agoric-sdk/issues
- npm.io page: https://npm.io/package/@agoric/store

## Dependencies (5)

- [@endo/exo](https://npm.io/package/@endo/exo.md) ^1.5.12
- [@endo/errors](https://npm.io/package/@endo/errors.md) ^1.2.13
- [@endo/marshal](https://npm.io/package/@endo/marshal.md) ^1.8.0
- [@endo/patterns](https://npm.io/package/@endo/patterns.md) ^1.7.0
- [@endo/pass-style](https://npm.io/package/@endo/pass-style.md) ^1.6.3

## Recent versions

- 0.10.0 (latest) — 2026-04-08
- 0.9.3-dev-8656b52.0.8656b52 (dev) — 2026-09-09
- 0.11.0-upgrade-23-dev-224776f.0.224776f (upgrade-23-dev) — 2026-08-12
- 0.11.0-u23.0 (agoric-upgrade-23) — 2026-05-06
- 0.10.1-upgrade-22-dev-0922d04.0.0922d04 (upgrade-22-dev) — 2026-04-08
- 0.9.3-other-dev-d15096d.0.d15096d (other-dev) — 2025-11-13
- 0.10.0-u22.1 (agoric-upgrade-22) — 2025-09-09
- 0.9.3-u21.0.1 (agoric-upgrade-21) — 2025-07-29
- 0.9.3-ymax-v0.2-alpha-dev-8e37faa.0 (ymax-v0.2-alpha-dev) — 2025-07-21
- 0.9.3-upgrade-21-dev-16519b2.0 (upgrade-21-dev) — 2025-06-19
- 0.9.3-u21.0 (community-dev) — 2025-06-19
- 0.9.3-upgrade-19-devnet-dev-5428c4d.0 (upgrade-19-devnet-dev) — 2025-04-24
- 0.9.3-upgrade-20-dev-ef71cfd.0 (upgrade-20-dev) — 2025-04-17
- 0.9.3-u20.0 (agoric-upgrade-20) — 2025-04-17
- 0.9.3-upgrade-19-dev-5428c4d.0 (upgrade-19-dev) — 2025-03-13
- … 3610 more at https://npm.io/package/@agoric/store/versions

## README

# TODO REWRITE

# Store

A wrapper around JavaScript Map.

Store adds some additional functionality on top of Map.

1. Store distinguishes between initializing (`init`) a (key,
   value) pair and resetting the key to a different value (`set`),
   whereas Map doesn't. This means you can use the Store
   abstraction without having to check whether the key already exists.
   This is because the method that you call (`init` or `set`) marks
   your intention and does it for you.

2. You can use the Store methods in a functional programming
   pattern, which you can't with Map. For instance, you can create
   a new function `const getPurse = Store.get` and you can do
   `myArray.map(Store.get)`. You can't do either of these with
   Map, because the Map methods are not tied to a particular
   Map instance.

See `makeScalarWeakMapStore` for the wrapper around JavaScript's WeakMap abstraction.

---

Be aware that both `@agoric/base-zone` and this package `@agoric/store` will move from the agoric-sdk repository to the endo repository and likely renamed `@endo/zone` and `@endo/store`. At that time, we will first deprecate the versions here, then replace them with deprecated stubs that reexport from their new home. We hope to eventually remove even these stubs, depending on the compat cost at that time.

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