# radiant-moon-storage

> A simple library for local storage management

Latest version **1.0.2** (published 2024-04-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install radiant-moon-storage
pnpm add radiant-moon-storage
yarn add radiant-moon-storage
bun add radiant-moon-storage
```

## 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 | 2024-04-17 |
| First published | 2024-03-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | pampinda |
| Keywords | storage, local storage, browser |

## Links

- npm: https://www.npmjs.com/package/radiant-moon-storage
- Repository: https://github.com/pampinda/radiant-moon-storage
- Homepage: https://github.com/pampinda/radiant-moon-storage#readme
- Issues: https://github.com/pampinda/radiant-moon-storage/issues
- npm.io page: https://npm.io/package/radiant-moon-storage

## Dependencies (1)

- [store](https://npm.io/package/store.md) ^2.0.12

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2024-04-17
- 1.0.1 — 2024-03-21
- 1.0.0 — 2024-03-18

## README

## # Radiant Moon Storage

Radiant Moon Storage is a flexible and efficient storage library for JavaScript environments. It provides a simple interface for storing, retrieving, and managing data with the added feature of namespacing to organize your data efficiently.

## Installation

You can install Radiant Moon Storage via npm:

```bash
npm install radiant-moon-storage
```

## Usage

```javascript
const RadiantMoonStorage = require('radiant-moon-storage');

// Create a new instance of RadiantMoonStorage with an optional namespace
const storage = new RadiantMoonStorage('mynamespace');

// Set an item in the storage
storage.setItem('myKey', 'myValue');

// Get an item from the storage
const value = storage.getItem('myKey');

// Remove an item from the storage
storage.removeItem('myKey');

// Clear all items in the storage (within the specified namespace)
storage.clear();
```

## API

### `new RadiantMoonStorage(namespace)`

Creates a new instance of RadiantMoonStorage with an optional namespace.

- `namespace` (optional): A string representing the namespace for the storage. Default is `'default'`.

### `setItem(key, value)`

Sets a key-value pair in the storage.

- `key`: The key for the item.
- `value`: The value to be stored.

### `getItem(key)`

Retrieves the value associated with the specified key from the storage.

- `key`: The key of the item to retrieve.

### `removeItem(key)`

Removes the item associated with the specified key from the storage.

- `key`: The key of the item to remove.

### `clear()`

Clears all items in the storage within the specified namespace.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

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