# drossel-webstorage

> Unneccesary web storage utility

Latest version **1.0.0** (published 2016-08-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install drossel-webstorage
pnpm add drossel-webstorage
yarn add drossel-webstorage
bun add drossel-webstorage
```

## 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.0 |
| Published | 2016-08-30 |
| First published | 2016-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | nanocloudx |
| Maintainers | nanocloudx |
| Keywords | storage, webstorage, localStorage, sessionStorage |

## Links

- npm: https://www.npmjs.com/package/drossel-webstorage
- Repository: https://github.com/nanocloudx/drossel-webstorage
- Homepage: http://drossel.io/
- Issues: https://github.com/nanocloudx/drossel-webstorage/issues
- npm.io page: https://npm.io/package/drossel-webstorage

## 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.0 (latest) — 2016-08-30

## README

# drossel-webstorage
Unneccesary web storage wrapper.

[![NPM](https://nodei.co/npm/drossel-webstorage.png)](https://nodei.co/npm/drossel-webstorage/)

## What is this?
"drossel-webstorage" is a module for easier use of the WebStorage.  
It does not affect the other namespace.  
(Note: It has been implemented by the ES2015.)

## Install
step1: npm install
```
npm install drossel-webstorage
```

step2: import and create instance
```
const Storage = require('drossel-webstorage');
const exampleStorage = new Storage('somethingNamespace');
```

## Usage

### Class (namespace, isSessionStorage = false)
```
const fooLocalStorage = new Storage('foo');
const barSessionStorage = new Storage('bar', true);
```

### save(key, value = null)
```
exampleStorage.save('aaa', 111);
exampleStorage.save('bbb', {xxx: 222});
```

### load(key)
```
exampleStorage.load('aaa'); // return 111
exampleStorage.load('bbb'); // return {xxx: 222}
```

### loadAll()
```
exampleStorage.loadAll(); // return {aaa: 111, bbb: {xxx: 222}}
```

### exists(key)
```
exampleStorage.exists('aaa'); // return true
exampleStorage.exists('ccc'); // return false
```

### remove(key)
```
exampleStorage.remove('bbb'); // return null
```

### removeAll()
```
exampleStorage.removeAll(); // return null
```

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