# combo-storage

> The package allows you to manage data in LocalStorage, SessionStorage and Cookies

Latest version **2.1.2** (published 2022-06-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install combo-storage
pnpm add combo-storage
yarn add combo-storage
bun add combo-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 | 2.1.2 |
| Published | 2022-06-25 |
| First published | 2019-12-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 24.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | awibox |
| Maintainers | awibox |
| Keywords | sessionstorage, localstorage, cookie-methods, npm-package |

## Links

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

## 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

- 2.1.2 (latest) — 2022-06-25
- 2.1.1 — 2022-06-25
- 2.1.0 — 2022-06-24
- 2.0.4 — 2020-04-19
- 2.0.3 — 2020-04-03
- 2.0.2 — 2020-03-21
- 2.0.1 — 2020-02-29
- 2.0.0 — 2020-02-29
- 1.1.3 — 2020-01-19
- 1.1.2 — 2020-01-14
- 1.1.1 — 2020-01-14
- 1.1.0 — 2019-12-21
- 1.0.0 — 2019-12-21

## README

<div align="center">

![combo-storage](https://repository-images.githubusercontent.com/228675568/0c2f3900-2426-11ea-91c3-ce97fdf2164c)

[![Version](https://img.shields.io/npm/v/combo-storage)](https://www.npmjs.com/package/combo-storage)
[![Build](https://img.shields.io/github/workflow/status/awibox/combo-storage/Release)](https://github.com/awibox/combo-storage/actions)
[![Coverage](https://coveralls.io/repos/github/awibox/combo-storage/badge.svg?branch=master)](https://coveralls.io/github/awibox/combo-storage?branch=master)
[![Minified size](https://img.shields.io/bundlephobia/min/combo-storage)](https://github.com/awibox/combo-storage/blob/master/LICENSE)
[![Downloads](https://img.shields.io/npm/dm/combo-storage)](https://www.npmjs.com/package/combo-storage)
[![Tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)

</div>

## Table of contents
* [Installation](#installation)
* [Getting started](#gettingstarted)
* [Methods for LocalStorage and SessionStorage](#basemetnods)
* [Cookie methods](#cookie)
* [Contributing](#contributing)

<a name="installation"></a>
## Installation
You need to install package.
```bash
npm install combo-storage
```

<a name="gettingstarted"></a>
## Getting started
You should import the required storage to use the package
```js
import { LocalStorage, SeessionStorage, Cookie } from 'combo-storage'
```
Then use the methods of storage. For example:
```js
LocalStorage.set('user', 'awibox');
```

<a name="basemetnods"></a>
## Base methods for LocalStorage and SessionStorage
|Method|LocalStorage|SessionStorage
|------|------------|--------------|
|**set**|```LocalStorage.set(key, value)```|```SessionStorage.set(key, value)```|
|**get**|```LocalStorage.get(key)```|```SessionStorage.get(key)```|
|**remove**|```LocalStorage.remove(key)```|```SessionStorage.remove(key)```|
|**сlear**|```LocalStorage.clear()```|```SessionStorage.clear()```|

**Note:** get and set methods are available for working with objects and arrays.


<a name="cookie"></a>
## Cookie methods
|Method|Example|
|------|------------|
|**set**|```Cookie.set(name, value, days);```|
|**get**|```Cookie.get(name)```|
|**remove**|```Cookie.remove(name)```|

<a name="contributing"></a>
## Contributing
Please read through our [CONTRIBUTING.md](/.github/CONTRIBUTING.md).

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