# ionstore

> A very simple isomorphic key-value store with a Map-like API for persisting session data.

Latest version **1.0.1** (published 2025-01-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install ionstore
pnpm add ionstore
yarn add ionstore
bun add ionstore
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2025-01-12 |
| First published | 2023-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | fabiospampinato |
| Keywords | simple, isomorphic, session, temporary, temp, store, storage |

## Links

- npm: https://www.npmjs.com/package/ionstore
- Repository: https://github.com/fabiospampinato/ionstore
- Homepage: https://github.com/fabiospampinato/ionstore#readme
- Issues: https://github.com/fabiospampinato/ionstore/issues
- npm.io page: https://npm.io/package/ionstore

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2025-01-12
- 1.0.0 — 2023-08-03

## README

# IonStore

A _very_ simple isomorphic key-value store with a Map-like API for persisting session data.

This module simply uses a temporary file under Node, and `sessionStorage` under a browser. Check out [`isostore`](https://github.com/fabiospampinato/isostore) if you need something a bit more sophisticated.

## Install

```sh
npm install ionstore
```

## Usage

```ts
import IonStore from 'ionstore';

// Creating a store, for temporary persistence

const store = new IonStore ( 'my-store' ); // The id of the store decides the name of the file on disk

store.has ( 'foo' ); // => false
store.set ( 'foo', 'some_string' ); // => store
store.get ( 'foo' ); // => 'some_string'
store.delete ( 'foo' ); // => true
```

## License

MIT © Fabio Spampinato

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