# @zestic/app-storage

> Cross platform storage

Latest version **0.9.17** (published 2021-08-30) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @zestic/app-storage
pnpm add @zestic/app-storage
yarn add @zestic/app-storage
bun add @zestic/app-storage
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.9.17 |
| Published | 2021-08-30 |
| First published | 2021-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | iampersistent |

## Links

- npm: https://www.npmjs.com/package/@zestic/app-storage
- Repository: https://github.com/zestic/app-storage
- npm.io page: https://npm.io/package/@zestic/app-storage

## Dependencies (2)

- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.14.0
- [@ionic/storage](https://npm.io/package/@ionic/storage.md) ^3.0.6

## Recent versions

- 0.9.17 (latest) — 2021-08-30
- 0.9.16 — 2021-08-30
- 0.9.14 — 2021-08-30

## README

# AppStorage

### Initialize

Add the `createStore()` method to the top of index.tsx after the imports. If you want to make sure the name of the storage is unique, pass that name as a parameter `createStore('_zestic');`

### Useage

To store a value call the storeValue() function, passing in the name of the value and the value

`await storeValue('hello', 'world');`

To retrieve the value from the storage call

```
const value = await getValue('hello');

// value = 'world'
```

If a value has not been set, by default, a null value is returned.

If you want to set the default value, just pass it in as a second parameter.

```
const value = await getValue('doesNotExist', 'vanished');

// value = 'vanished'
```

To clear the set value, call `await clearValue('hello');`

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