# presentation-storage

> The Augmented.js Next - Presentation Storage Module.

Latest version **2.5.7** (published 2019-05-21) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install presentation-storage
pnpm add presentation-storage
yarn add presentation-storage
bun add presentation-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.5.7 |
| Published | 2019-05-21 |
| First published | 2018-08-10 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 872.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Bob Warren |
| Maintainers | thedocbwarren |
| Keywords | augmentedjs, presentation |

## Links

- npm: https://www.npmjs.com/package/presentation-storage
- Repository: https://github.com/Augmentedjs/presentation-storage
- Homepage: http://www.augmentedjs.com
- Issues: https://github.com/Augmentedjs/presentation-storage/issues
- npm.io page: https://npm.io/package/presentation-storage

## Dependencies (1)

- [next-core-structures](https://npm.io/package/next-core-structures.md) ^2.5.3

## Recent versions

- 2.5.7 (latest) — 2019-05-21
- 2.5.6 — 2018-11-12
- 2.5.5 — 2018-09-14
- 2.5.4 — 2018-08-21
- 2.5.3 — 2018-08-10
- 2.5.2 — 2018-08-10

## README

# presentation-storage

Augmented.js Presentation Storage Module

# API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [LocalStorage](#localstorage)
    -   [Parameters](#parameters)
    -   [isSupported](#issupported)
        -   [Properties](#properties)
    -   [isSupported](#issupported-1)
    -   [getItem](#getitem)
        -   [Parameters](#parameters-1)
    -   [setItem](#setitem)
        -   [Parameters](#parameters-2)
    -   [removeItem](#removeitem)
        -   [Parameters](#parameters-3)
    -   [clear](#clear)
    -   [key](#key)
        -   [Parameters](#parameters-4)
    -   [length](#length)
-   [LocalStorageFactory](#localstoragefactory)
    -   [getStorage](#getstorage)
        -   [Parameters](#parameters-5)
-   [NamespacedLocalStorage](#namespacedlocalstorage)
    -   [Parameters](#parameters-6)
    -   [isSupported](#issupported-2)
    -   [getItem](#getitem-1)
        -   [Parameters](#parameters-7)
    -   [setItem](#setitem-1)
        -   [Parameters](#parameters-8)
    -   [removeItem](#removeitem-1)
        -   [Parameters](#parameters-9)
    -   [clear](#clear-1)
    -   [key](#key-1)
        -   [Parameters](#parameters-10)
    -   [length](#length-1)
    -   [getNamespacedItems](#getnamespaceditems)

## LocalStorage

Local Storage API - returned from LocalStorageFactory

### Parameters

-   `persist` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Persistant storage or not

### isSupported

is Persistant or not

#### Properties

-   `isPersisted` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Persistant property

### isSupported

Is storage supported

Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returns true if supported

### getItem

Gets an item from storage

#### Parameters

-   `itemKey`  
-   `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The key in storage

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Returns object from storage

### setItem

Sets an item to storage

#### Parameters

-   `itemKey`  
-   `object` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The data to set
-   `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The key in storage

### removeItem

Removes an item from storage

#### Parameters

-   `itemKey`  
-   `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The key in storage

### clear

Clears storage - <b>Warning: Destructive in non-namespaced instances!</b>

### key

Gets the key from storage for index

#### Parameters

-   `i` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** The index in storage

Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Returns the key from storage

### length

The length of storage by keys

Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Returns the length of storage by keys

## LocalStorageFactory

LocalStorageFactory
Retrieve a local storage Object

### getStorage

Get the storage instance

#### Parameters

-   `persist` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Persistance or not
-   `namespace` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The namespace of the storage if needed (optional)

Returns **[LocalStorage](#localstorage)** Returns an instance of local storage

## NamespacedLocalStorage

**Extends LocalStorage**

NamespacedLocalStorage
Retrieve a local storage Object

### Parameters

-   `persist`  
-   `namespace`  

### isSupported

Is storage supported

Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returns true if supported

### getItem

Gets an item from storage

#### Parameters

-   `itemKey`  
-   `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The key in storage

Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Returns object from storage

### setItem

Sets an item to storage

#### Parameters

-   `itemKey`  
-   `object` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The data to set
-   `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The key in storage

### removeItem

Removes an item from storage

#### Parameters

-   `itemKey`  
-   `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The key in storage

### clear

Clears storage for namespace

### key

Gets the key from storage for index

#### Parameters

-   `i` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** The index in storage

Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Returns the key from storage

### length

The length of storage by keys

Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Returns the length of storage by keys

### getNamespacedItems

Gets the namespaced items as a Map

Returns **AugmentedMap** Returns the namespaced storage as Map

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