An open API service indexing awesome lists of open source software.

https://github.com/h2non/asyncstore

A localStorage super shim with asynchronous asteroids using Web Workers (experimental)
https://github.com/h2non/asyncstore

Last synced: 4 months ago
JSON representation

A localStorage super shim with asynchronous asteroids using Web Workers (experimental)

Awesome Lists containing this project

README

          

# asyncStore

A fully asynchronous `localStorage` implementation using Web Workers

**Note**: beta implementation. Do not use in production projects

## Installation

Install via npm
```
npm install asyncstore
```

Install via Bower
```
bower install asyncstore
```

Install via Component
```
component install h2non/asyncStore
```

Or loading the script remotely
```html

```

## Browser Support

![Chrome](https://raw.github.com/alrra/browser-logos/master/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/firefox/firefox_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/internet-explorer/internet-explorer_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/safari/safari_48x48.png)
--- | --- | --- | --- | --- |
+23 | +10 | +10 | +15 | +7 |

## Usage

The API mimics the [localStorage API](http://www.w3.org/TR/webstorage/#storage) with fully asynchronous based on `callbacks`

#### Read

```js
asyncStore.getItem(key, callback)
```

#### Write

```js
asyncStore.setItem(key, value, callback)
```

#### Remove

```js
asyncStore.removeItem(key, callback)
```

#### Clear

```js
asyncStore.clear(callback)
```

#### Length
```js
asyncStore.length // -> 1
```

## License

MIT - Tomas Aparicio