# a-storage

> Provide an easy way to use storage in browsers.

Latest version **1.0.2** (published 2017-01-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install a-storage
pnpm add a-storage
yarn add a-storage
bun add a-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 | 2017-01-03 |
| First published | 2016-11-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | vincent.bian |
| Maintainers | vincent.bian |
| Keywords | storage, localStorage, sessionStorage, webStorage |

## Links

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

## Dependencies (1)

- [object-assign](https://npm.io/package/object-assign.md) ^4.1.0

## 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.2 (latest) — 2017-01-03
- 1.0.1 — 2016-11-18
- 1.0.0 — 2016-11-17

## README

# a-storage

[![npm](https://img.shields.io/npm/v/a-storage.svg)](https://www.npmjs.com/package/a-storage)
[![npm](https://img.shields.io/npm/dm/a-storage.svg)](https://www.npmjs.com/package/a-storage)

a-storage is a simple JavaScript library for easily using WebStorage API.


Install width npm:

```sh
npm install --save a-storage
```

## Configuration

Typical Usage:

```js
import Storage, { DRIVERS } from 'a-storage';
const storage = Storage({
  dirver: DRIVERS.SESSIONSTORAGE
});
```

### driver

- Select the usage of particular driver.
- default: `LOCALSTORAGE`
- available drivers:

driver | description
--- | ---
`MEMORY` | Use JavaScript Object
`LOCALSTORAGE` | Use native localStorage
`SESSIONSTORAGE` | Use native sessionStorage
`DOMAINSTORAGE` | domainStorage provide by dingtalk

### Promise

- Provide your own `Promise` implemention
- default: native `Promise` object

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