# @brighter/storage

> A JavaScript object storage library that enables local development.

Latest version **1.6.3** (published 2025-02-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @brighter/storage
pnpm add @brighter/storage
yarn add @brighter/storage
bun add @brighter/storage
```

## 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.6.3 |
| Published | 2025-02-16 |
| First published | 2023-02-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 29.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Bostjan Rihter |
| Maintainers | brihter |
| Keywords | javascript, node, object storage, amazon, aws, s3, cloudflare, r2, hetzner |

## Links

- npm: https://www.npmjs.com/package/@brighter/storage
- Repository: https://github.com/brihter/storage
- Homepage: https://github.com/brihter/storage#readme
- Issues: https://github.com/brihter/storage/issues
- npm.io page: https://npm.io/package/@brighter/storage

## Dependencies (2)

- [iconv-lite](https://npm.io/package/iconv-lite.md) ^0.6.3
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.35

## 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.6.3 (latest) — 2025-02-16
- 1.6.2 — 2025-02-15
- 1.6.1 — 2025-02-12
- 1.6.0 — 2025-02-12
- 1.5.9 — 2025-02-11
- 1.5.8 — 2025-02-09
- 1.5.7 — 2025-02-07
- 1.5.6 — 2025-02-05
- 1.5.5 — 2025-02-05
- 1.5.4 — 2025-02-05
- 1.5.2 — 2023-02-23
- 1.5.1 — 2023-02-22
- 1.5.0 — 2023-02-22
- 1.4.2 — 2023-02-22
- 1.4.1 — 2023-02-22
- … 18 more at https://npm.io/package/@brighter/storage/versions

## README

# @brighter/storage

This is the core object storage library.

Instead of manually installing and injecting the dependencies, you'll most likely want to use one of the following storage adapters that come pre-bundled with everything required:

* [@brighter/storage-adapter-local](../storage-adapter-local/) and
* [@brighter/storage-adapter-s3](../storage-adapter-s3/).

If you still wish to manually install and inject the dependencies, please proceed.

## Quick Start

Installation, using npm:

```
npm i @brighter/storage
```

Usage:

```js
import { Storage } from '@brighter/storage'

const storage = Storage({
  type: 'local',
  path: '/tmp/storage'
})

const main = async () => {
  await storage.write('msg', 'hi')
  const msg = await storage.read('msg')
  console.log(msg)
}

main().catch(console.error)
```

For more information:

- have a look at the [demo](demo/) folder or
- dive straight into the [documentation](docs/Storage.md).

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