# localstorage-async

> Abstraction of HTML5's localStorage with added asynchronity

Latest version **0.1.2** (published 2014-03-12) · 0 weekly downloads

## Install

```sh
npm install localstorage-async
pnpm add localstorage-async
yarn add localstorage-async
bun add localstorage-async
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2014-03-12 |
| First published | 2014-03-12 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Thomas Kosiewski |
| Maintainers | thomask33 |
| Keywords | localStorage, asynchronity, async |

## Links

- npm: https://www.npmjs.com/package/localstorage-async
- Repository: https://github.com/ThomasK33/localStorage-async
- Issues: https://github.com/ThomasK33/localStorage-async/issues
- npm.io page: https://npm.io/package/localstorage-async

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

- 0.1.2 (latest) — 2014-03-12

## README

localStorage-async
===================

Abstraction of HTML5's localStorage with added asynchronity for node

Usage
-----

```javascript
	var localStorage = require("localstorage-async");

	/**
	 * [configure - quick setup of localStorage]
	 * @param  {object}   configs  [Quick configuration of localStorage. exmaple: {location: "localDB", encoding: "utf-8"}]
	 * @param  {Function} callback [Function to be executed when finished]
	 */
	localStorage.configure(configs, callback);

	/**
	 * [setLocation - set localStorage's current directory]
	 * @param {String}   location      [The directory which should be used]
	 * @param {Boolean}   remove      [Delete currently used directory?]
	 * @param {Function} callback [Function to be executed when finished]
	 */
	localStorage.setLocation(location, remove, callback);

	/**
	 * [getLocation - get localStorage's current directory]
	 * @param  {Function} callback ({String} location) [Function gets current (String) location passed]

	 */
	localStorage.getLocation(callback);

	/**
	 * [setEncoding - set the encoding]
	 * @param {String}   encoding [Encoding which should be used]
	 * @param {Function} callback [Function to be executed when finished]
	 */
	localStorage.setEncoding(encoding, callback);

	/**
	 * [getEncoding - get the current encoding]
	 * @param  {Function} callback ({String} encoding) [Function gets current (String) encoding passed]
	 */
	localStorage.getEncoding(callback);

	/**
	 * [setItem - Set a specific item]
	 * @param {String}   name     [Name of the Item to be set]
	 * @param {String}   value    [Value of the Item]
	 * @param {Function} callback (err, data) [Function to be executed when finished]
	 */
	localStorage.setItem(name, value, callback);

	/**
	 * [getItem - get a specific Item from localStorage]
	 * @param  {String}   name     [Name of the Item]
	 * @param  {Function} callback (err, data) [Function to be executed when finished]
	 */
	localStorage.getItem(name, callback);

	/**
	 * [removeItem - remove a special Item from localStorage]
	 * @param  {String}   name     [Name of the Item that will be removed]
	 * @param  {Function} callback (err, data) [Function to be executed when finished]
	 */
	localStorage.removeItem(name, callback);

	/**
	 * [clear - Remove every item in localStorage]
	 * @param  {Function} callback [Function to be executed when finished]
	 */
	localStorage.clear(callback);

	/**
	 * [valueOf - get every Item in localStorage]
	 * @param  {Function} callback (err, data) [Function to be executed when finished]
	 */
	localStorage.valueOf(callback);
```

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