# @glenngijsberts/customstorage

> Easy to use wrapper for [localStorage API](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) 🧠.

Latest version **2.0.0** (published 2020-11-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @glenngijsberts/customstorage
pnpm add @glenngijsberts/customstorage
yarn add @glenngijsberts/customstorage
bun add @glenngijsberts/customstorage
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-11-11 |
| First published | 2019-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 16.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Glenn Gijsberts |
| Maintainers | glenngijsberts |

## Links

- npm: https://www.npmjs.com/package/@glenngijsberts/customstorage
- npm.io page: https://npm.io/package/@glenngijsberts/customstorage

## Recent versions

- 2.0.0 (latest) — 2020-11-11
- 1.0.2 — 2019-04-18
- 1.0.1 — 2019-04-18
- 1.0.0 — 2019-04-08

## README

# CustomStorage

Easy to use wrapper for [localStorage API](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) 🧠.

## Install

```shell
# Install
npm install @glenngijsberts/customstorage --save
```

```javascript
import CustomStorage from '@glenngijsberts/customstorage'
```

## Usage

```javascript
/*
    get item
*/
const token = CustomStorage.get('token')

/*
    set: token, value, cachetime
*/
const token = 'AABB12'
CustomStorage.set('token', token, 60)

/*
    remove item
*/
CustomStorage.remove('token')

/*
    clear storage (all items)
*/
CustomStorage.clear()
```

## Clone

```shell
# clone the repo
git clone https://github.com/glenngijsberts/CustomStorage.git

# install dependencies / or npm install
yarn

# tests / or npm run test
yarn test

# build / or npm run prepare
yarn prepare
```

## Contribution

Feel free to contribute to this package. If you have any questions you can reach out to me on [twitter](https://twitter.com/glenngijsberts) 😄 This package is inspired by this [vue tabs package](https://github.com/spatie/vue-tabs-component) from the guys at [spatie](https://github.com/spatie).

## License

MIT

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