# private-local-storage

> Store data in local storage securily

Latest version **1.0.2** (published 2021-08-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install private-local-storage
pnpm add private-local-storage
yarn add private-local-storage
bun add private-local-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 | 2021-08-28 |
| First published | 2021-08-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 21.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | naveenkash |
| Keywords | local storage, secure, private, crypto, hash |

## Links

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

## Dependencies (1)

- [crypto-js](https://npm.io/package/crypto-js.md) ^4.1.1

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2021-08-28
- 1.0.1 — 2021-08-28
- 1.0.0 — 2021-08-16

## README

# Private Local storage

Store data in local storage securily

## Usage/Examples

```javascript
import { PrivateLocalStorage } from "private-local-storage";

let SecureStorage = new PrivateLocalStorage({
  privateKey: "abcd1234#$",
});

function App() {
  handleSetItemClick = () => {
    SecureStorage.setItem("somekey", 'someValue)
  }

  return<button onClick={this.handleSetItemClick}>Set Item</button>
}
```

## Available Methods

#### Get item

```http
SecureStorage.getItem()
```

| Parameter | Type     | Description                               |
| :-------- | :------- | :---------------------------------------- |
| `key`     | `string` | **Required**. Your local storage item key |

#### .getItem(key)

#### Set item

```http
SecureStorage.setItem()
```

| Parameter | Type     | Description                                 |
| :-------- | :------- | :------------------------------------------ |
| `key`     | `string` | **Required**. Your local storage item key   |
| `value`   | `any`    | **Required**. Your local storage item value |

#### .setItem(key, value)

#### Delete item

```http
SecureStorage.deleteItem()
```

| Parameter | Type     | Description                               |
| :-------- | :------- | :---------------------------------------- |
| `key`     | `string` | **Required**. Your local storage item key |

#### .deleteItem(key, value)

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